Huawei Honor 4c - Kernel compilation and boot.img creation - Honor 4C ROMs, Kernels, Recoveries, & Other Develo

Hi all
Thanks to Olrak work for p8 lite, kirin version, i compiled a kernel for Huawei Honor 4c.
For now everything seems to work - android 6.0
Android 5.1 not tested
Code:
Changelog:
Android 6.0
boot60-v4
- added lionfish governor
- enabled all other deactivated governors
boot60-v3
- Initial public release, basic boot.img no tweaks
Android 5.1
boot51-v1
-initial Beta version for test
Downloads
Android 6.0
boot60-v3
boot60-v4
Android 5.1
boot51-v1
How to flash
Copy boot60-vxx.img to the root of your hdd (In windows c:\)
Enter fastboot
on a command line type
fastboot flash boot boot60-vxx.img
it will show something like this
Code:
target reported max download size of 471859200 bytes
sending 'boot' (23682 KB)...
OKAY [ 0.757s]
writing 'boot'...
OKAY [ 1.064s]
finished. total time: 1.825s
then
fastboot reboot
Your phone will reboot
Note:
If you have root you must re-root your phone
Version Information
Status: beta
Current Stable Version: v4
Stable Release Date: 2016-03-28
Created 2015-03-27
Last Updated 2016-03-28
github: android_kernel_huawei_hi6210sft

Kernel compilation error
Hi, Im trying to compile chm-u01 kernel on ubuntu 15.04, but I always get this error:
Code:
drivers/hisi/hi6xxx/hi6xxx_sim.c:24:24: fatal error: hi6xxx_sim.h: No such file or directory
compilation terminated.
scripts/Makefile.build:316: recipe for target 'drivers/hisi/hi6xxx/hi6xxx_sim.o' failed
make[3]: *** [drivers/hisi/hi6xxx/hi6xxx_sim.o] Error 1
scripts/Makefile.build:468: recipe for target 'drivers/hisi/hi6xxx' failed
make[2]: *** [drivers/hisi/hi6xxx] Error 2
scripts/Makefile.build:468: recipe for target 'drivers/hisi' failed
make[1]: *** [drivers/hisi] Error 2
make[1]: *** Waiting for unfinished jobs....

Must check if files are in correct location. Open makefile and see if files are correct sometimes changing < to " in file location helps compilation.
Are you using linaro?
Enviado do meu CHM-U01 através de Tapatalk

lloco73 said:
Must check if files are in correct location. Open makefile and see if files are correct sometimes changing < to " in file location helps compilation.
Are you using linaro?
Enviado do meu CHM-U01 através de Tapatalk
Click to expand...
Click to collapse
Yes I'm using linaro version 4.7.3, which toolchain do you using?

I'm with linaro also.
You are compiling arm or arm64?
Enviado do meu MotoG3 através de Tapatalk

Yu

lloco73 said:
I'm with linaro also.
You are compiling arm or arm64?
Enviado do meu MotoG3 através de Tapatalk
Click to expand...
Click to collapse
Its all I did:
Code:
.bashrc
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=/opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_$
Code:
make ARCH=arm hisi_hi6210sft_defconfig
make ARCH=arm zImage
please tell me what os you are running and how you configured environment for compilation

Your doing the right things.
I'm on a virtual machine running 14.04lts 64bits.
I try to see that location and see what's inside that folder.
If find anything I copy here.
This Source code is full of errors.
Enviado do meu MotoG3 através de Tapatalk

on hi6xxx_sim.c
on line 24 change
Code:
#include <hi6xxx_sim.h>
to
Code:
#include "hi6xxx_sim.h"
whenever you find error just go to the *.c file and try to change the corresponding line presented on the error from <xxxxxx.h> to "xxxxxx.h"
I can say the you have a lot to change. i'll upload it so you can save time

here is my kernel fileshttps://drive.google.com/open?id=0B_LzOjvUsn4dSGUtaGRnRndXc3c
extract it and compile it.
arm64 gives a lot of errors so cannot be compiled.
arm is compiled ok.
i will upload it to github

Hi everybody. I tried to compile the source code, using toolchain from google, linaro. But after compiling I don't see the compiled file - "Image" (I can't compile the source code when I wrote to the end of command "zImage", so I just wrote "Image"), it does not exist. I tried to compile from patched source, but the same result.
What am i doing wrong?

how about doing make ARCH=arm only

fitsuli said:
Hi everybody. I tried to compile the source code, using toolchain from google, linaro. But after compiling I don't see the compiled file - "Image" (I can't compile the source code when I wrote to the end of command "zImage", so I just wrote "Image"), it does not exist. I tried to compile from patched source, but the same result.
What am i doing wrong?
Click to expand...
Click to collapse
Hi, I had a same situation, you have to check your compilation output there would be errors

lloco73 said:
here is my kernel fileshttps://drive.google.com/open?id=0B_LzOjvUsn4dSGUtaGRnRndXc3c
extract it and compile it.
arm64 gives a lot of errors so cannot be compiled.
arm is compiled ok.
i will upload it to github
Click to expand...
Click to collapse
I used your source and it gave me zImage output but there is an error:
arm-linux-gnueabihf-ld: unrecognized option `-EL'
Try `arm-linux-gnueabihf-ld --help' for more information
make[1]: *** [arch/arm/kernel/built-in.o] Error 1
make: *** [arch/arm/kernel] Error 2
Click to expand...
Click to collapse

lloco73 said:
how about doing make ARCH=arm only
Click to expand...
Click to collapse
Thanks, it works.
But it seems that the arm works only on Android 4.4, Android 5.1 requires arm64, right?

fitsuli said:
Thanks, it works.
But it seems that the arm works only on Android 4.4, Android 5.1 requires arm64, right?
Click to expand...
Click to collapse
Yes
arm64 is for 5.1 but with this source we cannot make it, but i think arm work also on 5.1, a lot of errors when compiling to arm64

lloco73 said:
Yes
arm64 is for 5.1 but with this source we cannot make it, but i think arm work also on 5.1, a lot of errors when compiling to arm64
Click to expand...
Click to collapse
Device hangs on the first pic (5.1).
I'll check everything again, maybe it's my mistake here.

fitsuli said:
Device hangs on the first pic (5.1).
I'll check everything again, maybe it's my mistake here.
Click to expand...
Click to collapse
adb does not work , right?
how you made boot.img. with all available tools i cannot have a decent boot.img extraction so i can replace zimage to my own.
For my experiences compiled zimage is a lot smaller then the original. is this the same for you?

lloco73 said:
Hi all
I compiled new kernel from source - Lollipop kernel- for the chm-u01 and want to replace my zImage to the stock boot.img to test it, but i can't do it.
When i extract stock boot.img i get all this files
Here is the log for extraction
Code:
Magic = ANDROID!
magic_offset = 0x00000000
page_size = 2048 (00000800)
board = ''
base = 0x07478000
kernel_addr = 0x07480000
kernel offset = 0x00008000
kernel_size = 20346584 (013676d8)
ramdisk_addr = 0x0f000000
ramdisk offset = 0x07b88000
ramdisk_size = 3698022 (00386d66)
second_addr = 0x08300000
second offset = 0x00e88000
second_size = 0 (00000000)
tags_addr = 0x09e00000
tags offset = 0x02988000
cmdline = 'hisi_dma_print=0 vmalloc=384M maxcpus=8 coherent_pool=512K no_irq_affinity androidboot.selinux=enforcing ate_enable=true'
dt_size = 0 (00000000)
Till here everything ok
All files are very tiny except boot.img-kernel cause is where kernel resides
If i try to open it with 7-zip inside it i have 2 files
Name-----------Size------------Compressed size-------Characteristics
.reloc-------------0-----------------------0-----------------InitializedData DiscardableRead 0x100000
.text----------2034632---------------2034632------------Code Execute Read Write 0x500000
Tried to replace my compiled zImage name to boot.img-kernel but when all repacked to a boot.img and flashed it trough Fastboot on power phone stuck on logo
If anyone is interested to help here are the
stock boot.img
My compiled zImage
Used tool for spliting boot.img was CarlivImageKitchen-Windows_v1.0 both on windows and Ubuntu
Click to expand...
Click to collapse
Hi, where you got boot.img?, when i try to extract stock boot.img that i extracted from lollipop frimware i get this error:
Android magic not found

boot. img was extracted from stock lollipop Rom.
Enviado do meu MotoG3 através de Tapatalk

Related

[GUIDE]Newbie's Guide to Kernel Compiling

Background :
So I was asked by some people on how I compile kernels so I am just posting some stuff related to same .
This is a beginners' tutorial and is mostly relevant to Xperia 2011 MDPI section . It might work on other sections but I won't be offering any guarantee .
For whom is this tutorial designed for ?
People who like to read stuff and can read stuff ,people who have desire to learn something and would like a more hands on approach .
Index :
#post 1 = Introduction & Setup Environment
#post 2 =Index of Toolchains & sources+FAQ
#post 3 =Kernel Manipulation
#post 4=Compiling , Source Distribution
Click to expand...
Click to collapse
Requirements :
Linux Distro installed on PC .Thats preferrable . Search,read ,install.It's not rocket science .
I am using Linux Mint 13 in this tutorial . Ubuntu,Debian and Ubuntu/debian based distros should be similar to setup.
This tutorial should work on other distros too ...
Click to expand...
Click to collapse
I am not going to support questions/doubts regarding
Cygwin on Windows
Linux installed in Virtual machine
Live Linux distributions .
I would rather spend time fixing issue then figuring out how to do same thing in another environment .
Get tools for stuff you need not know
install these tools via relevant package manager
Code:
build-essential,bzip2,gcc-multilib,g++-multilib,git,gnupg,libncurses5-dev,lib32ncurses5-dev,lib32z1-dev,kernel-package,ia32-libs,zlib1g-dev,zip
e.g for Linux Mint it's
Code:
sudo apt-get install build-essential bzip2 gcc-multilib g++-multilib git gnupg libncurses5-dev lib32ncurses5-dev lib32z1-dev kernel-package ia32-libs zlib1g-dev zip
Next download Android SDK and configure adb and fastboot . Use the amazing service known as google to set up .Test run if they work properly .
Click to expand...
Click to collapse
Some information :
Q1:What is boot.img ,kernel and ramdisk ?
Boot.img or the file you flash to boot partion .It is actually made up of two parts.
zImage is the actual kernel .You can't edit it .You have to recompile it using the kernel sources
initrd.img is the ramdisk .Using tools like Android Kitchen or kernel-tools-master you can edit it .
More about each part in relevant section .
Q2:How do you manipulate ramdisk,change bootlogo ?
A: Check @dsixda 's Android Kitchen or @championswimmer 's kernel-tools-master
Q3:Where does BOOTCLASSPATH lie in ramdisk ?
A:It's present in init.rc
Q4:Where do you change the path to wifi libs ?
A:Check init.semc.rc
Steps I use to work with Boot.img
Modify Ramdisk with Android Kitchen completely .
Use Stock kernel
Repack using Android kitchen
Check if kernel boots
if it does than you have a working ramdisk.
Now you just have to change zImage after compiling it.
Click to expand...
Click to collapse
Sources :
For Xperia Phones
Download the stock sources from
http://developer.sonymobile.com/dow...s/open-source-archive-for-build-4-0-2-a-0-84/
http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/
to fix toolchain errors
I peeked into wedgess' Lupus and kast's Kappa sources
https://github.com/garwedgess/LuPuS-STOCK-ICS-Xperia2011
Toolchains :
Toolchains are the compilers (cross compilers to be exact ) with which kernel is compiled .
There are tooooooooo many compilers .
I can't test everyone
The best way is to go for compilers which are proven to be work
Path to the compiler .
Before compiling kernels the path to cross compiler must be exported using
Code:
export CROSS_COMPILE=path_ to_compiler
e.g.
My 4.4.3 compiler lies in
/home/user/android-ndk-r8d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
In the folder of the toolchain the compiler is present ,all the tools are prefixed with arm-linux-android-eabi-
so the path to compiler becomes
Code:
export CROSS_COMPILE=/home/karan/xd/android-ndk-r8d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin//arm-linux-androideabi-
Some have arm-eabi- as prefix ,some have no prefixes .Adjust the path accordingly
The usual path of compiler is in bin folder .
Toolchain sources :
Source no 1 : Android NDK
http://developer.android.com/tools/sdk/ndk/index.html
Download the one which has above 360MB of download size ...I have the older version and it has 4.4.3,4.6,4.7
Source no. 2 : Github of @DooMLoRD and @wedgess
https://github.com/garwedgess/toolchains
https://github.com/DooMLoRD/android_prebuilt_toolchains
Doomlord has 4.4.3,Linaro 4.6.2,4.7
Wedgess has 4.4.3 ,Linaro 4.6.2 , Linaro 4.7.3
Use git clone command to download the toolchains
e.g
Code:
git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git
Code:
git clone https://github.com/garwedgess/toolchains.git
@Christopher83's thread
http://forum.xda-developers.com/showthread.php?p=36677987
He has one toolchain for every occasion . If you wish to dabble ,feel free to dive in ...
FAQ:
What Toolchain works on Stock sources ?
On pure Stock ROM ,without any modification I have been able to compile only on the 4.4.3 by DoomLord ..I would recommend using that one.It works fine on both ICS and GB stock kernels .The kernels boot fine
What should be done so that that you can compile with other toolchains ?
A:There are certain changes in the main Makefile which need to be carried out
Open the main makefile and search for
KBUILD_CFLAGS
Replace
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks
with
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-unused-but-set-variable -Wno-uninitialized \
-fno-strict-aliasing -fno-common \
-Wimplicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks
Now open
Code:
/include/linux/netfilter/x_tables.h
and delete these lines
Code:
const struct xt_match *match;
const void *matchinfo;
That should fix 4.6.2 & 4.7.3 erros
The Linaro 4.7.3 toolchain requires editing the /arch/arm/boot/compressed/Makefile.Honestly ,peek into kast's Makefile ,since I was able to compile only by applying his Makefile fix .
For others ,Please check logs and correct errors
Making changes to source :
Governors,I/O schedulers & Overclocking :-
Check XDA university's thread
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
It's very well written and i don't want to repeat the same stuff
Making changes to Partition on MDPI
this is a post I made earlier :Read it for details ..
http://forum.xda-developers.com/showthread.php?t=2532418
Compiling the kernel :
First Open Terminal in the main kernel directory .
It is in kernel folder of stock sources .
Step no. 1
Export the architecture .Our phone use arm architecture . Some phones use x86 architecture like our phones .Hence the architecture must be defined before compiling .Do this by .
Code:
export ARCH=arm
Step no. 2
Export the Cross Compiler since thats what will be used to compile kernel .
Code:
export CROSS_COMPILE=/home/karan/a/android_prebuilt_toolchains/arm-linux-androideabi-4.7/bin/arm-linux-androidwabi-
Step no. 3
Clean earlier builds . Important before recompiling
Code:
make clean && make mrproper
Step no. 4
Specify the defconfig
The default config for xperia is in /arch/arm/configs ...they are like semc_mango_defconfig or whatever phone you are using
use
Code:
make semc_mango_defconfig
Step no. 5 Editing: optional
Make edits via menuconfig or xconfig :
This allows you to enable/disable governors,schedulers,filesytems ,modify other parameters which were predefined in defconfig
Code:
make menuconfig
OR
Code:
make xconfig
menuconfig is Command line tool while xconfig is the graphical interface .
You can save the config and use it later and use that as defconfig next time instead
Step 6: Compile
Initiate Compiling ....
Code:
make
If you are compiling for first time it's recommended to use
Code:
make
instead of
Code:
make -j2
or whatever . It will help you to troubleshoot errors .Else errors will be thrown ,you wouldn't be abele to view in terminal and there would be no zImage
Step no. 7: Grab zImage and pack it
after successful compiling zImage will be present in /arch/arm/boot folder
Then use Android kitchen to pack it .
Source Distribution :
1)In a tar ball like sony
Just use an archive manager and make a tar archive ...
Advantages : Easy ,hassle free
Disadvantages : Too large in size if modifying very few aspects
2.)Using diff patch
It's like a comparing tool
e.g If I am my base kernel source is Lupus and I have added some tweak then I can create a patch file which can be used on the Lupus source and the result will be my work .It's pretty handy if you are dealing with few files .
Advantages : small size ,pretty handy ,
Disadvantages : Without a proper text editor like Geany ,check patches is a nuisance .The Mesa patch for MDPI has over 1,500,000 lines ...enough to screw with normal text editors
3)Git with github or similar site
It's a fantastic way to upload source .It allows many features to a developer which makes life lot easier .
Advantages : Excellent Version Control
Disadvantages : Steep learning curve .
Git is quite complex for a newbie and it can overwhelm a person .I would suggest reading a lot about git and experimenting thoroughly before diving in .
Credits :
@pinkflozd
For helping me out when i needed
@DooMLoRD
 @wedgess
 @kast
 @an0nym0us_
Peeked in their sources and learnt Stuff
Recommended Text Editor :If you want to seriously dabble with sources I would suggest to use Geany .
It saves a lot of time .It's a must have if you peek a lot into patch files and/or sources .
Reserved for future FAQ
Reserved Just in case
Reserved Just in case
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Thanx
@karandpr- a guide like this suits for the android general or appropriate forums!
Why keep it so inside? just a suggestion though
Thanx for this!
piousheart said:
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Click to expand...
Click to collapse
usually the error of unknown CPU architecture is because you're using linaro toolchain but without proper definition of CPU architecture in Makefile flags. stay away from linaro for first timer. i would strongly suggest using google vanilla 4.4.3 toolchain. abit old but always work given that the're no actual error in the source itself.
Finally karan:thumbup: Thanks a lot for the guide. Really helpful
Cheers,
Vatsal
piousheart said:
Stuck with this errors!
trying to find solution from a week
Xperia Mini | Stock GB Kernel Source | android-ndk-r9b-linux-x86.tar.bz2 with x32 ubuntu
http://forum.xda-developers.com/showthread.php?t=2569212
Thanks for the guide
Now i dont have to search around.
Click to expand...
Click to collapse
add
Code:
-Wno-unused-but-set-variable
in the makefile in KBUILD_CFLAGS =
Didn't check the second error .
It's because you are using Linaro 4.7.3
Like i said above
Code:
/arch/arm/boot/compressed/Makefile
You need to change it a bit ...
Compare it with changes of Kappa or Lupus .
http://forum.xda-developers.com/showthread.php?p=36677987
an0nym0us_ said:
usually the error of unknown CPU architecture is because you're using linaro toolchain but without proper definition of CPU architecture in Makefile flags. stay away from linaro for first timer. i would strongly suggest using google vanilla 4.4.3 toolchain. abit old but always work given that the're no actual error in the source itself.
Click to expand...
Click to collapse
Thanks for the reply!
I'm not using linaro toolchain but ndk r9b (something 4.8)
i also modified makefile according to your solution i found when searching google in one of the xda thread.
---------- Post added at 11:20 AM ---------- Previous post was at 11:18 AM ----------
karandpr said:
add
Code:
-Wno-unused-but-set-variable
in the makefile in KBUILD_CFLAGS =
Didn't check the second error .
It's because you are using Linaro 4.7.3
Like i said above
Code:
/arch/arm/boot/compressed/Makefile
You need to change it a bit ...
Compare it with changes of Kappa or Lupus .
http://forum.xda-developers.com/showthread.php?p=36677987
Click to expand...
Click to collapse
I'm not using Linaro but ndk r9b. (correct me if ndk is also known as Linaro, im a Noob)
piousheart said:
Thanks for the reply!
I'm not using linaro toolchain but ndk r9b (something 4.8)
i also modified makefile according to your solution i found when searching google in one of the xda thread.
---------- Post added at 11:20 AM ---------- Previous post was at 11:18 AM ----------
I'm not using Linaro but ndk r9b. (correct me if ndk is also known as Linaro, im a Noob)
Click to expand...
Click to collapse
I will take a look at it but for time being ,I would recommend switching to 4.4.3 since it has least erros and the zImage boots fine .
Congratulations karan for finally making the guide will be very helpful for many of us :good:
[email protected] ~/13/kernel $ export ARCH=arm
[email protected] ~/13/kernel $ export CROSS_COMPILE=~/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
[email protected] ~/13/kernel $ make semc_haida_defconfig
#
# configuration written to .config
#
[email protected] ~/13/kernel $ make -j4
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
CC kernel/bounds.s
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected] ~/13/kernel $
Hey karan can you look into this error?
koradiavatsal said:
[email protected] ~/13/kernel $ export ARCH=arm
[email protected] ~/13/kernel $ export CROSS_COMPILE=~/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
[email protected] ~/13/kernel $ make semc_haida_defconfig
#
# configuration written to .config
#
[email protected] ~/13/kernel $ make -j4
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
CC kernel/bounds.s
/bin/sh: 1: /home/vatsal/file:///home/vatsal/android/kernel/ndk/toolchains/4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected] ~/13/kernel $
Hey karan can you look into this error?
Click to expand...
Click to collapse
Check Path to toolchains
Can i use the guide for 2010 devices? X10mini..
piousheart said:
Can i use the guide for 2010 devices? X10mini..
Click to expand...
Click to collapse
Yes... Except you will need different source...
Sent from my MT11i using Tapatalk 2
Attitude.SSJ said:
Yes... Except you will need different source...
Sent from my MT11i using Tapatalk 2
Click to expand...
Click to collapse
can you prefer any toolchain?

kernel compilation error

i am trying to compile s6 edges kernel but i am getting an error can you please help me solving it i am on ubuntu 14.04
here is the error log
make: ../PLATFORM/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8/bin/aarch64-linux-android-gcc: Command not found
you have to change the path in the makefile to your gcc path
Alex-V said:
you have to change the path in the makefile to your gcc path
Click to expand...
Click to collapse
Do i have to give it Toolchains path
Sent from my Moto G using Tapatalk
Can you please tell me how to do that i am new to the aarch64 kernel compilation
Sent from my Moto G using Tapatalk
sanchit0403 said:
Can you please tell me how to do that i am new to the aarch64 kernel compilation
Sent from my Moto G using Tapatalk
Click to expand...
Click to collapse
Just the path to the toolchain, it's identical for 32bit as well. The toolchain is different, but the procedure is the same as for 32bit
i changed its address to /home/sanchit/s6/aarch64-linux-gnu-4.9/bin/
but still getting same error with this location and command not found
sanchit0403 said:
i changed its address to /home/sanchit/s6/aarch64-linux-gnu-4.9/bin/
but still getting same error with this location and command not found
Click to expand...
Click to collapse
[...]/bin/aarch64-linux-android-
mythos234 said:
[...]/bin/aarch64-linux-android-
Click to expand...
Click to collapse
[email protected]:~/s6/kernel$ make exynos7420-zerolte_defconfig
make: ../home/sanchit/s6/aarch64-linux-gnu-4.9/bin/aarch64-linux-gnu-gcc: Command not found
still same error i am using sabermod toolchain and i have installed all the libraries
sanchit0403 said:
[email protected]:~/s6/kernel$ make exynos7420-zerolte_defconfig
make: ../home/sanchit/s6/aarch64-linux-gnu-4.9/bin/aarch64-linux-gnu-gcc: Command not found
still same error i am using sabermod toolchain and i have installed all the libraries
Click to expand...
Click to collapse
You type this in the terminal?
make: ../path to toolchain?
Thats wrong, use this:
export CROSS_COMPILE=/path
mythos234 said:
[...]/bin/aarch64-linux-android-
Click to expand...
Click to collapse
mythos234 said:
You type this in the terminal?
make: ../path to toolchain?
Thats wrong, use this:
export CROSS_COMPILE=/path
Click to expand...
Click to collapse
nono i edited make file and changed cross compile diresction then i entered these commands
[email protected]:~/s6/kernel$ sudo nano Makefile
[sudo] password for sanchit:
[email protected]:~/s6/kernel$ export CROSS_COMPILE=/home/sanchit/s6/aarch64-linux-gnu-4.9/bin/aarch64-
[email protected]:~/s6/kernel$ export ARCH=arm64
[email protected]:~/s6/kernel$ make exynos7420-zerolte_defconfig
make: ../home/sanchit/s6/aarch64-linux-gnu-4.9/bin/aarch64-linux-gnu-gcc: Command not found
#
# configuration written to .config
#
[email protected]:~/s6/kernel$
now i reverted all the change makefile is default one still facing error i guess its a gcc error but i have update to 4.9
[email protected]:~/s6/kernel$ export CROSS_COMPILE=/home/sanchit/s6/aarch64-linux-gnu-4.9/bin/aarch64-
[email protected]:~/s6/kernel$ export [email protected]:~/s6/kernel$ make exynos7420-zerolte_defconfigmake: ../PLATFORM/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8/bin/aarch64-linux-android-gcc: Command not found
#
# configuration written to .config
#
[email protected]:~/s6/kernel$
sanchit0403 said:
i am trying to compile s6 edges kernel but i am getting an error can you please help me solving it i am on ubuntu 14.04
here is the error log
make: ../PLATFORM but I'm be /prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8/bin/aarch64-linux-android-gcc: Command not but 5th 3 bin E but 2hfound
Click to expand...
Click to collapse
Sent from my SM-G900V using XDA Free mobile appz5
I tv dd
that error fixed by updating aarch65 gcc libraries and here comes new error
[email protected]:~$ make exynos7420-zerolte_defconfig
make: *** No rule to make target `exynos7420-zerolte_defconfig'. Stop.
mythos234 said:
You type this in the terminal?
make: ../path to toolchain?
Thats wrong, use this:
export CROSS_COMPILE=/path
Click to expand...
Click to collapse
Any solution please
Sent from my Moto G using Tapatalk
sanchit0403 said:
Any solution please
Sent from my Moto G using Tapatalk
Click to expand...
Click to collapse
Do you still have this problem?
I am also facing this problem when compiling samsung a7 2016 64 bit kernel. Have anyone got solution.

[Sony] Xperia Open Devices Project

Sony Mobile is committed to supporting the open developer community, and one way to show this is by publishing parts of our code as well as selected tools developed by our internal developers.
For some of the Xperia™ devices, we provide Android™ Open Source Project (AOSP) device configurations on GitHub. This means that the software will be open for you as a developer to use and contribute to. This is a way for us to support the open Android community, and it is also a tool for us to facilitate and verify contributions to AOSP.
If you want to build AOSP for your unlocked Xperia device, you find all the resources you need in the sections below.
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
Unified 3.10 kernel sources
https://github.com/sonyxperiadev/kernel
Project git
https://github.com/sonyxperiadev/
Now you have the opportunity to win Sony devices every 2 months
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/hero-open-source-developers/
Happy cooking
SGP712 comilation of 28.0.A.7.251 fails
@jerpelea
Code:
CC drivers/input/touchscreen/maxim_sti.o
drivers/input/touchscreen/maxim_sti.c: In function 'maxim_parse_dt':
drivers/input/touchscreen/maxim_sti.c:1133:7: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
pdata->stylus_support = (u16)val;
^
drivers/input/touchscreen/maxim_sti.c: In function 'nl_process_driver_msg':
drivers/input/touchscreen/maxim_sti.c:1602:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
drivers/input/touchscreen/maxim_sti.c:1632:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
scripts/Makefile.build:308: recipe for target 'drivers/input/touchscreen/maxim_sti.o' failed
make[3]: *** [drivers/input/touchscreen/maxim_sti.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[2]: *** [drivers/input/touchscreen] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[1]: *** [drivers/input] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I will revert your stylus (really?) patches to version .31
Or please update a declaration struct maxim_sti_pdata at the proper location.
EDIT: I added
Code:
u32 stylus_support;
to 28.0.A.7.251/kernel/include/linux/maxim_sti.h
EDIT2:
I flashed the DE 28.0.A.7.251 - works.
I can not get the kernel compiled here to boot! .27 and .31 are fine with there ROMS and even last a few minutes with the rest of .251
It always (even with default configuration) bootloops.
I tried (via flashtool on linux and Windows 7) to decompress the ORIGINAL kernel.sin from the DE FTF and build a boot image via mkbootimg -> bootloop
EDIT3:
more info, AOSP also a desaster:
http://forum.xda-developers.com/showpost.php?p=62785131&postcount=58
DHGE said:
@jerpelea
Code:
CC drivers/input/touchscreen/maxim_sti.o
drivers/input/touchscreen/maxim_sti.c: In function 'maxim_parse_dt':
drivers/input/touchscreen/maxim_sti.c:1133:7: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
pdata->stylus_support = (u16)val;
^
drivers/input/touchscreen/maxim_sti.c: In function 'nl_process_driver_msg':
drivers/input/touchscreen/maxim_sti.c:1602:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
drivers/input/touchscreen/maxim_sti.c:1632:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
scripts/Makefile.build:308: recipe for target 'drivers/input/touchscreen/maxim_sti.o' failed
make[3]: *** [drivers/input/touchscreen/maxim_sti.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[2]: *** [drivers/input/touchscreen] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[1]: *** [drivers/input] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I will revert your stylus (really?) patches to version .31
Or please update a declaration struct maxim_sti_pdata at the proper location.
EDIT: I added
Code:
u32 stylus_support;
to 28.0.A.7.251/kernel/include/linux/maxim_sti.h
EDIT2:
I flashed the DE 28.0.A.7.251 - works.
I can not get the kernel compiled here to boot! .27 and .31 are fine with there ROMS and even last a few minutes with the rest of .251
It always (even with default configuration) bootloops.
I tried (via flashtool on linux and Windows 7) to decompress the ORIGINAL kernel.sin from the DE FTF and build a boot image via mkbootimg -> bootloop
EDIT3:
more info, AOSP also a desaster:
http://forum.xda-developers.com/showpost.php?p=62785131&postcount=58
Click to expand...
Click to collapse
28.0.A.8.251 compiles and boots first time for me on Z3+. EDIT: seems to perform better too, with Antutu benchmark score going up from 47,800 to ~53,000
28.0.A.8.251 compiles and boots first time for me on Z3+
Click to expand...
Click to collapse
I hope they tested the source on this device.
Maybe they do not test all kitakami devices e.g. SGP712
DHGE said:
I hope they tested the source on this device.
Maybe they do not test all kitakami devices e.g. SGP712
Click to expand...
Click to collapse
Seems ok for now. I'm running it at the moment on a custom rom that has xposed installed and it's so far stable. This is the kernel in the current firmware, so I'm sure it's been tested.
AOSP uses a different kernel source
https://github.com/sonyxperiadev/kernel
please clarify
@jerpelea
All I write on compiling applies to my SGP712.
AOSP uses a different kernel source
Click to expand...
Click to collapse
Than what?
The latest kernel/include/linux/maxim_sti.h I could find in that repository on GitHub is ancient and without the stylus variable:
@kholkkholk on 29 May input: TS: Add Maxim SmartTouch Imager driver
Click to expand...
Click to collapse
I think that is OK for karin_windy.
I just followed your writeup on SONY Developer!
The last time I complained you added the fastboot flash -S hint for 2015 devices...
I just did a repo sync and added the revised binary drivers which left me first time with a booting device but without touch (today: "hard" bootloop).
Not AOSP:
The kernel for 28.A.0.8.251 you posted on SONY Developer does not compile here without the change in the kernel/include/linux/maxim_sti.h header file.
Flashing the compiled boot.img results in bootloops whatever I tried.
btw: # CONFIG_DM_VERITY is not set
Hi
i have recompiled the kernel
https://github.com/sonyxperiadev/kernel
i have tested karin_windy here with same V11 archive and flashed all 3 partitions
i have touch screen and device working fine
br
J
DHGE said:
@jerpelea
All I write on compiling applies to my SGP712.
Than what?
The latest kernel/include/linux/maxim_sti.h I could find in that repository on GitHub is ancient and without the stylus variable:
I think that is OK for karin_windy.
I just followed your writeup on SONY Developer!
The last time I complained you added the fastboot flash -S hint for 2015 devices...
I just did a repo sync and added the revised binary drivers which left me first time with a booting device but without touch (today: "hard" bootloop).
Not AOSP:
The kernel for 28.A.0.8.251 you posted on SONY Developer does not compile here without the change in the kernel/include/linux/maxim_sti.h header file.
Flashing the compiled boot.img results in bootloops whatever I tried.
btw: # CONFIG_DM_VERITY is not set
Click to expand...
Click to collapse
Thanks @jerpelea for the update!
I am mostly interested in the stagefright patches.
I do not find them in my repo synced AOSP tree.
The (compiled) patches are in ROM 28.0.A.8.251 though and last week I finally managed to get this rooted and running on my karin_windy.
I will try AOSP again if I have more time.
How is the AOSP source for the Z4, does it build yet? Looks like things are building towards a TWRP/AOSP release.
Sent from my SGP712 using Tapatalk
Is there a news on a ASOP build for the Z4?
Sent from my SGP771 using Tapatalk
FreeXperia has AOSP builds for "karin". Will they also work on "karin windy"?
streilu said:
FreeXperia has AOSP builds for "karin". Will they also work on "karin windy"?
Click to expand...
Click to collapse
FreeXperia has "karin windy" builds too.
Look here: http://fxpblog.co/aosp/aosp-5-1/ and choose the first of the 2 possible mirror providers (different sets of files are offered at each), scroll to the buttom and the latest ASOP for the Z4 is there. I have yet to try and install it as the download consistently fails and then forces me to wait for 24 hours.
http://developer.sonymobile.com/201...-camera-available-for-experienced-developers/
enjoy
J
Is anybody able to download any of the ASOP builds from http://fxpblog.co/ ?
Could they be mirrored, at a more "normal" file host?
I can upload it later today to your preferred hoster if you tell me.
streilu said:
I can upload it later today to your preferred hoster if you tell me.
Click to expand...
Click to collapse
How about https://www.androidfilehost.com/ that would seem appropriate. But frankly any host which does not force you to pay for downloads.
Got no dev account on AFH, sorry.
Hope this is ok: https://mega.nz/#!aEZlnZJS
@HotBlack77 please tell me how AOSP feels on the Z4 tab. I'm unsure about the BL unlock thing.
Gesendet von meinem SGP712 mit Tapatalk
Hi all
We have published a new snapshot, zip v14, with camera update (improved quality and stability)
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
Enjoy
J

Cannot build openssl while compiling Zenfone 2 Kernel

Hi all,
Recently I have issues with building a zenfone kernel in uBuntu Trusty Tahr.
When I ran "make openssl", I got this error:
x86_64-linux-android-gcc: error: unrecognized command line option '-fno-canonical-system-headers'
make: *** [/out/zenfone-ze551ml/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_openssl_openssl_gyp_intermediates/third_party/openssl/openssl/crypto/aes/asm/aes-586.o] Error 1
Click to expand...
Click to collapse
and the compilation process stopped.
I have been searching to many forums but fail to find the solution to this problem.
Could you help me?
The gcc --version is gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
leenakeenev said:
Hi all,
Recently I have issues with building a zenfone kernel in uBuntu Trusty Tahr.
When I ran "make openssl", I got this error:
and the compilation process stopped.
I have been searching to many forums but fail to find the solution to this problem.
Could you help me?
The gcc --version is gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Click to expand...
Click to collapse
U built for Lollipop or Marshmallow? And go to your prebuilts/gcc toolchain folder, then execute this below command to correct gcc version as suggested by ASUS "git checkout tools_r22.2"
Sent from my ASUS_Z00AD using Tapatalk
quanganh2627 said:
U built for Lollipop or Marshmallow? And go to your prebuilts/gcc toolchain folder, then execute this below command to correct gcc version as suggested by ASUS "git checkout tools_r22.2"
Sent from my ASUS_Z00AD using Tapatalk
Click to expand...
Click to collapse
I built it for Lollipop 5.0.0 (android-5.0.0_r7).
Git checkout tools_r22.2 doesn't work as it always says "error: pathspec 'tools_r22.2' did not match any file(s) known to git."
So according to this topic: asus.com/zentalk/forum.php?mod=viewthread&tid=7537 I downloaded the "tool_r22.2.tgz" tools from the page instead.
However it doesn't solve the problem.
sr, not read carefully. u followed Asus Readme in kernel package , didn't u? maybe they forgot to update that guide, "tools_r22.2" is deprecated of gcc4.7 and prior only, now at gcc4.8 or 4.9 on Aosp haven't got it, but u can use "lollipop-released" or "android-5.0.0_r7". And make sure ur local repo have "external/openssl" inside.
Sent from my ASUS_Z00AD using Tapatalk

[HELP][SOLVED]Errors while building from source

I am trying to port AOSPA marshmallow-caf (paranoid android) to victara and i cant get past these 2
1.
Code:
frameworks/base/packages/StatementService/src/com/android/statementservice/DirectStatementService.java:149: error: cannot access OkCacheContainer
mHttpResponseCache = HttpResponseCache.install(httpCacheDir, HTTP_CACHE_SIZE_IN_BYTES);
^
class file for com.android.okhttp.OkCacheContainer not found
1 error
make: *** [build/core/java.mk:394: out/target/common/obj/APPS/StatementService_intermediates/classes-full-debug.jar] Error 41
i tried building for the bacon using device trees and vendor stuff from official aospa repos but it also throws this error so i think its not device specific.
2.
Secondly the kernel is not compiling its throwing section mismatch error
Code:
ERROR: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
i am using the CM kernel sources and defconfig
On googling someone suggested to change toolchains so switched to the one provided in AOSPA manifest (namely eabi-4.8 toolchain in google aosp repos , revision android-r16) previously i was using UBERTC arm-eabi-4.8.
But the exact same error popped up and the exact same file vmlinux.o
Interestingly the kernel is built successfully if i build it separately outside the AOSPA tree , or if i build it inside resurrection remix source tree , with both the toolchains .
Also since i mentioned bacon previously , bacon's kernel doesn't throw this error.
EDIT :
I reverted this
the kernel compiled without section mismatches but i encountered
Code:
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
make[2]: *** [modules] Error 1
make[1]: *** [sub-make] Error 2
i think this and this were responsible
i tried compiling with
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
and got the bootimg
so i guess kernel is done
but the class file not found error remains
Ok so i was able to fix the class file not found error also
The problem was that i was using jdk8 i switched to jdk7 and it compiled successfully

Categories

Resources