Kernel Source of Nokia 1
(TA-1047/TA-1060/TA-1056/TA-1079/TA-1066)
LINK > https://github.com/DhirajSurvase/Kernel_Nokia_1_MT6737
Instructions >
clone the source code
go to kernel dir
run "bash build.sh" command
ur compiled kernel will be under out/arch/arm/*
Official release of Nokia 1 Kernel sources available at https://www.nokia.com/en_int/phones/opensource
Hi,
We tried the official kernel and built it. After flashing the kernel, phone boot and it asked for a password. We gave password "1234" and it reboots and went in recovery.
Its always rebooting in recovery. We flashed the original boot image. Behavior did not change.
Is there any other recovery image we can use and flash the original boot image and bring the phone to working condition?
Thank You!
Mayur
DhirajMS said:
Kernel Source of Nokia 1
(TA-1047/TA-1060/TA-1056/TA-1079/TA-1066)
LINK > https://github.com/DhirajSurvase/Kernel_Nokia_1_MT6737
Instructions >
clone the source code
go to kernel dir
run "bash build.sh" command
ur compiled kernel will be under out/arch/arm/*
Click to expand...
Click to collapse
Everyone, help me compile kernel from this source please. I can't do it, because i'm noobie for compile any sources.
ntnamkg said:
Everyone, help me compile kernel from this source please. I can't do it, because i'm noobie for compile any sources.
Click to expand...
Click to collapse
just clone it..
and hit "bash build.sh"
Thanks for respond. But, it is fail, below (some text):
make[1]: *** [scripts] Error 2
make[1]: Leaving directory `/home/namnt/Nokia1/Kernel_Nokia_1_MT6737-master/out'
make: *** [sub-make] Error 2
make: Leaving directory `/home/namnt/Nokia1/Kernel_Nokia_1_MT6737-master'
Click to expand...
Click to collapse
I try build on Ubuntu 14.04, 16.04 and Manjaro linux, all get this notice.
Ok
build.sh: line 35: make: command not found
build.sh: line 39: make: command not found
Click to expand...
Click to collapse
After run bash build get above notice. How to fix it? Thanks
ntnamkg said:
After run bash build get above notice. How to fix it? Thanks
Click to expand...
Click to collapse
apt-get install build-essential
would install make, gcc and other required tools.
Related
After I download the source for android, update with the local_manifest, and then repo sync to 1.5r2 and build (just to get a vanilla rom together) I'm running this to make my update-script:
Code:
./make-update-script /home/android/mydroid/out/target/product/dream/system/ /home/android/mydroid/out/target/product/dream/android-info.txt > update-script
For some reason no matter what I do with the update script it constantly Errors out at:
E:Can't symlink /system/bin/setprop
E:Failure at line 16
symlink toolbox SYSTEM:bin/setprop
Installation aborted.
Click to expand...
Click to collapse
Am I missing a step somewhere?
mianosm said:
After I download the source for android, update with the local_manifest, and then repo sync to 1.5r2 and build (just to get a vanilla rom together) I'm running this to make my update-script:
Code:
./make-update-script /home/android/mydroid/out/target/product/dream/system/ /home/android/mydroid/out/target/product/dream/android-info.txt > update-script
For some reason no matter what I do with the update script it constantly Errors out at:
Am I missing a step somewhere?
Click to expand...
Click to collapse
Where can I download make-update-script? I am having the same symlink issue when using other peoples update-script with my custom ROM too.
After you run make:
Code:
./out/host/linux-x86/obj/EXECUTABLES/make-update-script_intermediates:
make-update-script
make-update-script.o
make-update-script.P
make-update-script
make-update-script_intermediates
mianosm said:
After you run make:
Code:
./out/host/linux-x86/obj/EXECUTABLES/make-update-script_intermediates:
make-update-script
make-update-script.o
make-update-script.P
make-update-script
make-update-script_intermediates
Click to expand...
Click to collapse
Can you provide me a download link.
Here is the source:
http://source.android.com/download
After you've downloaded the source, you will need to update your local_manifest in your .repo directory:
http://source.android.com/documentation/building-for-dream
Then you can modify the source as you see fit, run make, and let me know how the make-update-script works out for you. ; )
Wondering if anyone can give me a hand. I am trying to build the kernel from source and am running into a problem. What am I doing wrong?
First I obtain the kernel binary git log
git clone https://android.googlesource.com/device/lge/hammerhead
cd hammerhead
git log --max-count=1
I then made note of the commit message received
Then I downloaded kernel sources
git clone https://android.googlesource.com/kernel/msm.git
Then I downloaded prebuilt GCC
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
Then I went to build
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
git checkout (with the commit message from earlier)
make hammerhead_deconfig
Then I get this error message
make: *** No rule to make target `hammerhead_deconfig'. Stop.
Not sure what I did wrong or how to resolve. Any suggestions? Thanks.
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Gnome said:
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Click to expand...
Click to collapse
I'll give that a go and should I perform that command in the hammerhead path or msm path?
Sent from my Nexus 5 using XDA Free mobile app
Chochiwpg said:
I'll give that a go and should I perform that command in the hammerhead path or msm path?
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Do that in kernel patch itself..
Based on your post the Kernel Path is msm, so:
Code:
cd msm
then run the commands, dont forget to checkout the right branch, I think it's android-hammerhead-kk-mr2
Code:
git checkout android-hammerhead-kk-mr2
Gnome said:
Dude, its hammerhead_defconfig not hammerhead_deconfig.
Check my SCRIPT
Click to expand...
Click to collapse
Hey bud,
tried defconfig as well and got the exact same error message. Sigh
I'm writing this incomplete instruction for my friend @emfox based on the instruction I used to reconstruct Redmi 2 kernel source http://forum.xda-developers.com/and.../how-to-convert-qualcomms-dtb-to-dts-t3221223 Unfortunately I couldn't finish this instruction without Mi 4c device. This is just a quick look, short information, to check the possibility to reconstruct an open source kernel based on CAF project. It's will be hard but not impossible.
1. Clone MSM8992 vanilla kernel source, LA.BF64.1.2.2-02940-8x92.0 release for Marshmallow 6.0.1 (release LA.BF64.1.2.1.c1-05410-8x92.0 branch LA.BF64.1.2.1.c1_rb1.38 for Lollipop 5.1.1) https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/?h=LA.BF64.1.2.2_rb4.22
Code:
git clone git://codeaurora.org/quic/la/kernel/msm-3.10 -b LA.BF64.1.2.2_rb4.22
2. Stock 4c kernel was compiled without CONFIG_IKCONFIG, vanilla kernel config libra_defconfig attached
3. Attached 3 dts file from stock kernel, msm8992-mtp-0xc.dts seem compatible to emfox device (qcom,board-id = <0xc 0x0>; )
4. Attached a vanilla dts file for MSM8992 MTP msm8992-mtp.dts as a result of LA.BF64.1.2.2_rb4.22 built
You can compare msm8992-mtp-0xc.dts to msm8992-mtp.dts using a diff tool (i.e. Kompare app) and start creating device tree source for Mi 4c: msm8992-mtp-libra.dts, msm8992-mtp-libra.dtsi, batterydata-itech-3020mah.dtsi, dsi-panel-sharp-rsp61322-1080p-video.dtsi, dsi-panel-auo-nt35596-1080p-video.dtsi, dsi-panel-lgd-nt35596-1080p-video.dtsi, dsi-panel-sharp-nt35595-1080p-video.dtsi, dsi-panel-jdi-nt35595-1080p-video.dtsi, msm8992-camera-sensor-mtp-libra.dtsi, etc. You can use https://github.com/kumajaya/android...mmit/3de4f3564a82f44049a8664d4383c6d3ed43cb47 as a reference. Mi 4c based on same board platform as LG G4 or Nexus 5X. Good luck!
How to build kernel outside Android source tree:
I assume your home directory is /home/user, kernel source inside /home/user/android/libra/kernel, Android source tree inside /home/user/android/system-13.0
1. Create an environtment text file, save it as /home/user/android/build-arm64.env (change CROSS_COMPILE to point to your toolchain):
Code:
export CROSS_COMPILE='/home/user/android/system-13.0/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-'
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm64
export ARCH=arm64
2. Import environtment file above, create a build directory outside the kernel source tree (to keep the kernel source clean):
Code:
$ cd /home/user/android/libra/kernel
$ source /home/user/android/build-arm64.env
$ mkdir -p /home/user/android/libra/kernel-out
$ make O=/home/user/android/libra/kernel-out mrproper
3. Import the kernel config file, change the kernel configuration (if needed) and start the building process:
Code:
$ make O=/home/user/android/libra/kernel-out libra_defconfig
$ make O=/home/user/android/libra/kernel-out menuconfig
$ make O=/home/user/android/libra/kernel-out
4. Copy the resulting kernel and modules (if available) to a binary directory:
Code:
$ mkdir -p /home/user/android/libra/kernel-bin
$ mkdir -p /home/user/android/libra/kernel-bin/modules
$ cp /home/user/android/libra/kernel-out/arch/arm64/boot/Image /home/user/android/libra/kernel-bin/
$ find /home/user/android/libra/kernel-out/ -type f -name *.ko -exec cp {} /home/user/android/libra/kernel-bin/modules/ \;
Creating a boot image:
Remember, this is incomplete guide
Roger that! I thought you have bought xiaomi 4c several days ago.
You're so kind to provide this tutorial. Since I know nearly nothing about kernel development, I'll start learning it step by step.
Thanks for the instruction.
Also @ekkilm / Teamsuperluminal might be able to help :fingers-crossed:
Autines said:
Roger that! I thought you have bought xiaomi 4c several days ago.
Click to expand...
Click to collapse
No, too expensive and my main device still in very good condition :laugh:
emfox said:
You're so kind to provide this tutorial. Since I know nearly nothing about kernel development, I'll start learning it step by step.
Click to expand...
Click to collapse
No problem, you also helped me a lot.
kevinnol said:
Thanks for the instruction.
Also @ekkilm / Teamsuperluminal might be able to help :fingers-crossed:
Click to expand...
Click to collapse
You're welcome.
OK, I've gone through the buiding kernel outside android tree steps, and now am trying to build MSM8992 vanilla kernel source from inside cm13 source directory.
command is 'source build/envsetup.sh &&breakfast libra && mka bootimage', but always got a command not found error, don't know what is missing...
Code:
<manifest>
<remote name="ghub" fetch="git://github.com/"/>
<project name="xiaomi-dev/android_device_xiaomi_libra.git" path="device/xiaomi/libra" remote="ghub" revision="cm-13.0"/>
<project name="AndropaX/proprietary_vendor_xiaomi_libra" path="vendor/xiaomi/libra" remote="ghub" revision="master"/>
</manifest>
and put kernel source to kernel/xiaomi/libra.
The error is
Code:
host C++: libc++_static <= external/libcxx/src/strstream.cpp
host C++: libc++_static <= external/libcxx/src/system_error.cpp
host C++: libc++_static <= external/libcxx/src/thread.cpp
host C++: libc++_static <= external/libcxx/src/typeinfo.cpp
host C++: libc++_static <= external/libcxx/src/utility.cpp
host C++: libc++_static <= external/libcxx/src/valarray.cpp
host StaticLib: libc++abi (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/libc++abi.a)
host StaticLib: libmincrypt (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: libhost (/home/emfox/android/system-13.0/out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
Building kernel...
/bin/bash: line 1: @: command not found
Export includes file: system/core/libcutils/Android.mk -- /home/emfox/android/system-13.0/out/host/linux-x86/obj/SHARED_LIBRARIES/libcutils_intermediates/export_includes
make[1]: Entering directory '/home/emfox/android/system-13.0/kernel'
make[1]: *** No rule to make target 'libra_defconfig'. Stop.
make[1]: Leaving directory '/home/emfox/android/system-13.0/kernel'
make[1]: Entering directory '/home/emfox/android/system-13.0/kernel'
make[1]: *** No rule to make target 'headers_install'. Stop.
make[1]: Leaving directory '/home/emfox/android/system-13.0/kernel'
kernel/xiaomi/libra/AndroidKernel.mk:110: recipe for target '/home/emfox/android/system-13.0/out/target/product/libra/obj/KERNEL_OBJ/.build_stamp' failed
make: *** [/home/emfox/android/system-13.0/out/target/product/libra/obj/KERNEL_OBJ/.build_stamp] Error 2
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/emfox/android/system-13.0'
#### make failed to build some targets (01:41 (mm:ss)) ####
Hi @emfox, i would gladly help you since i just finished cm12.1 build with device tree (i made a thread, with prebuilt kernel of course) and I'd like to start with cm13.
If you open source kernel has compiled correctly, can you do a "kernel_xiaomi_libra" github repository?
alterbang said:
Hi @emfox, i would gladly help you since i just finished cm12.1 build with device tree (i made a thread, with prebuilt kernel of course) and I'd like to start with cm13.
If you open source kernel has compiled correctly, can you do a "kernel_xiaomi_libra" github repository?
Click to expand...
Click to collapse
no, not really. I haven't finished the source.
I have little kernel hacking knowledge, so I'd like to set up and working environment first, then I'll go to deal these *dts files.
Ok, sorry then. I thought "'I've gone through the buiding kernel outside android tree steps," meant you had already finished
Maybe when I'll have some free time in the next days i will give the entire process a try!
alterbang said:
Ok, sorry then. I thought "'I've gone through the buiding kernel outside android tree steps," meant you had already finished
Maybe when I'll have some free time in the next days i will give the entire process a try!
Click to expand...
Click to collapse
oh, that would be great. I'm a developer but just on web and application domain, and have no much time to dig into kernel deeply. But I am learning
@emfox Don't forget copy libra_defconfig to arch/arm64/configs/
ketut.kumajaya said:
@emfox Don't forget copy libra_defconfig to arch/arm64/configs/
Click to expand...
Click to collapse
yes i have copied, or the error msg will be 'cannot found kernel configuration ...blabla'
emfox said:
yes i have copied, or the error msg will be 'cannot found kernel configuration ...blabla'
Click to expand...
Click to collapse
Please recheck your device board config, you can use LG G4 config as a reference https://github.com/CyanogenMod/andr...mon/blob/cm-13.0/BoardConfigCommon.mk#L49-L61
don't understand a thing from the coding but from what i have learned, kernel source would be awesome to develop more for the 4c. keep up the good work!
Yea would be really awesome, too bad xiaomi doesn't release it themself
Well there are a lot of crazy guys here on xda so there's still hope
Thinking to help @emfox to create a such template for 4c but no much free time here, just a short free time between my workload and no much interest without the device
ketut.kumajaya said:
Thinking to help @emfox to create a such template for 4c but no much free time here, just a short free time between my workload and no much interest without the device
Click to expand...
Click to collapse
yes, a working building directory structure will help me start the porting.
but no need hurry, we now have cm from www.teamsuperluminal.org. although it's close-sourced and use prebuilt kernel, still much better than miui.
Hi, anyone can give some more info how to build AOSP from nexus 5X?
am i alone like Taylor?
Looks like the kernel source will be released soon: http://en.miui.com/thread-235127-1-1.html
Showing me this when i type
Code:
make -j4
scripts/kconfig/conf --silentoldconfig Kconfig
include/config/auto.conf:189:warning: symbol value 'elf32-i386' invalid for OUTPUT_FORMAT
include/config/auto.conf:271:warning: symbol value 'arch/x86/configs/i386_defconfig' invalid for ARCH_DEFCONFIG
include/config/auto.conf:617:warning: symbol value '-fcall-saved-ecx -fcall-saved-edx' invalid for ARCH_HWEIGHT_CFLAGS
*** Error during update of the configuration.
/home/pranav/android2/kernel/scripts/kconfig/Makefile:33: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
/home/pranav/android2/kernel/Makefile:496: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
Click to expand...
Click to collapse
Trying to build it for Z3 MM Stock from Sony Copyright Archives
you have already configured toolchain?
if so, what are you using?
Then you must select defconfig, in case, shinano_leo_defconfig
Gustavo RD78 said:
you have already configured toolchain?
if so, what are you using?
Then you must select defconfig, in case, shinano_leo_defconfig
Click to expand...
Click to collapse
I have doomlord's toolchain..
This error only comes when i type that command at the end..
Following this Guide
http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
pranavmali said:
I have doomlord's toolchain..
This error only comes when i type that command at the end..
Following this Guide
http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
Click to expand...
Click to collapse
Which kernel are you trying to build also is your build machine 64-bit?
HerroYou said:
Which kernel are you trying to build also is your build machine 64-bit?
Click to expand...
Click to collapse
Its a 32bit machine
Building MM Stock based kernel
pranavmali said:
Its a 32bit machine
Building MM Stock based kernel
Click to expand...
Click to collapse
There is the problem, you need a 64 bit machine.
First you need to configure the kernel by making the defconfig.
Then you need to specify architecture you're building for using ARCH command.
See here:
http://developer.sonymobile.com/kno...h-a-linux-kernel-from-sony-copyleft-archives/
Also I don't see a branch for 23.5.A.0.575 which is the latest public MM firmware for Z3, so you need to grab the source code for this version off http://developer.sonymobile.com/downloads/xperia-open-source-archives/
Hey guys, thank you in advance. I have an LG X Power (K220) and I started to develop the stock AOSP from source (Android 6.0.1). I followed all the instruction from LG and Google (downloaded both google and LG source and then merged them). After seven hours of compiling I got my image file: system.img, cache.img, userdata.img and ramdisk.img. It was the time to flash and test the new build, so I used these command:
Code:
fastboot flash cache cache.img
Code:
fastboot flash ramdisk ramdisk.img
But when I have to flash the system.img and the userdata the device tell me that the images are too big and the message “Invalid sparse file format at header magi”. So I googled it and I tried with:
Code:
fastboot -S 256M flash system.img
But nothing. I also read that I could try to modify the BoardConfig.mk and add:
Code:
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
But I do not know what BoardConfig.mk I have to modify becouse when I merge the file and go to /device/lge/k7 there isn't the mk file, so I think that use the generic aosp for arm devices.
How could I solve this problem? Thank you another time :fingers-crossed:
Hi I'm also building AOSP for X Power. You need to change SYSTEM IMAGE partition size in aosp/device/generic/armv7-a-neon/BoardConfig.mk. That's beacouse we use "lunch 1" which mean "lunch aosp_arm-eng". If u need help send me message.
kko7 said:
Hi I'm also building AOSP for X Power. You need to change SYSTEM IMAGE partition size in aosp/device/generic/armv7-a-neon/BoardConfig.mk. That's beacouse we use "lunch 1" which mean "lunch aosp_arm-eng". If u need help send me message.
Click to expand...
Click to collapse
Are you able to build debug versions? That may help things for you.
Maybe I will be able but I'm getting clang error, so I need to fix it first.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/core/host_shared_library_internal.mk:51: out/host/linux-x86/obj/lib/libartd.so] Error 1
kko7 said:
Maybe I will be able but I'm getting clang error, so I need to fix it first.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/core/host_shared_library_internal.mk:51: out/host/linux-x86/obj/lib/libartd.so] Error 1
Click to expand...
Click to collapse
I fixed it. Now I am waiting for the compilation to finish.
If someone want I can upload it to AFH
kko7 said:
I fixed it. Now I am waiting for the compilation to finish.
If someone want I can upload it to AFH
Click to expand...
Click to collapse
How did you fix the error?
Modify build/core/clang/HOST_x86_common.mk
android-review.googlesource.com/c/platform/build/+/223100/1/core/clang/HOST_x86_common.mk
If that doesn't work then
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/x86_64-linux/bin/ld
But you need to be in aosp folder
kko7 said:
Modify build/core/clang/HOST_x86_common.mk
android-review.googlesource.com/c/platform/build/+/223100/1/core/clang/HOST_x86_common.mk
If that doesn't work then
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/x86_64-linux/bin/ld
But you need to be in aosp folder
Click to expand...
Click to collapse
Excellent, thank you! ?
Sands207 said:
Excellent, thank you! ?
Click to expand...
Click to collapse
No problem
kko7 said:
Maybe I will be able but I'm getting clang error, so I need to fix it first.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/core/host_shared_library_internal.mk:51: out/host/linux-x86/obj/lib/libartd.so] Error 1
Click to expand...
Click to collapse
How do you fix it?
I trying make a build for my Xperia X and Xperia M2 Aqua, but, justly, launch that error...
sebasrock156 said:
How do you fix it?
I try to make a build for my Xperia X and Xperia M2 Aqua, but, justly, launch that error...
Click to expand...
Click to collapse
Modify core/clang/HOST_x86_common.mk
https://android-review.googlesource.com/c/platform/build/+/223100/1/core/clang/HOST_x86_common.mk
If this doesn't work then try this command:
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/x86_64-linux/bin/ld
But you need to be in the aosp folder