[GUIDE] How to build a kernel for the Galaxy Player - Samsung Galaxy Player 4.0, 5.0

After numerous requests I've received from users concerning how-to build kernels, this guide will mostly answer your need to do so.
This guide will be separated in 3 distinct parts: Downloading sources, Building the actual kernel and making a working boot image and or zImage. So let's begin!!
Requirements: A linux computer
Part 1: Downloading sources
Before bulding any kernels, you must have it's source code. Every Android device manufacturers have the OBLIGATION to post them in order to comply with the GPL (GNU General Public License). You can mostly find them in their developpers specified site. You have two ways of download the required source in order to build a kernel: The manufacturer website or git.
1.1: Downloading using the manufacturer's website
You can download your Galaxy Player kernel source using mostly this website: opensource.samsung.com
When you're in it, you can go to the MP3 players section and take the source according to your device. To get the kernel source, unzip the xxxopensource.zip and you should see 2 separate files. Unzip the one with the mention KERNEL in it, it is your kernel.
1.2: Using git
Some of you may know it, some others not. For those who don't know what git is, here's a little explication from it's website
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Click to expand...
Click to collapse
A lot of developpers from around the world do use git because of it ease of use. There are several websites that uses the git protocol. The two most known are github and gitbucket. In order to download your kernel source, you must have found someone who uploaded it into these websites. For this example we will use the Cyanogenmod github's profile. You can download the source with 2 ways:
First way
1. Go into a existing kernel source repository (for example this one: https://github.com/CyanogenMod/android_kernel_samsung_aries)
2. Click the Download zip button situated at the mid-right
3. Unzip the zip and you should find your kernel source.
Note: When using this method, you must be sure of the branch choosen. Problems can happen if the wrong branch is used.
Second way
Note: You must have the git dependencies for linux. To download them for Debian, Ubuntu, please run this command: sudo apt-get install git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib
1. Go into a existing kernel source repository (https://github.com/CyanogenMod/android_kernel_samsung_aries)
2. We're going to "clone" the repository, to do so you will so this particular command:
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_aries.git aries
(the second aries word will be the name of the actual folder)
If you want to download another branch (because the one downloaded is the one shown in the website)
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_aries.git -b jellybean aries
(where's the -b means branch)
You should have your kernel source named aries output in the folder you specified.
Second part will cover mostly how to build a kernel.

Part 2 Building an actual kernel
In order to build a kernel, you must use an arm toolchain.
The GNU toolchain is a blanket term for a collection of programming tools produced by the GNU Project.
Click to expand...
Click to collapse
Here's a zip containing the arm-eabi-4.4.3 and arm-androideabi-4.6 toolchains
Toolchains Download
2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
In order to build a kernel, you MUST use a config file which defines the device's components. The easiest way of doing so is to take the manufacturer's stock configuration file (generaly it's a defconfig file found in arch/arm/configs). To create one, you use the make menuconfig command while in your kernel root directory. If you use a different source than your manufacturer one, You have to either ask the developper or to search for this file. (I can't say really much about it ).
2.3 Building the kernel
Once you've your config file and toolchain set up, you can begin the build. To do so you execute these command:
Code:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
make -jx (x is the number of jobs your computer can do a the same time. The recommended way to know how many to use is to take the number of cores in your CPU +1
Depending on the number of threads (jobs) used, it will be either long or not to compile your kernel. (Generally it takes between 5-15 minutes to compile a single kernel).
Once your kernel have been built, you will have it into the form of a file named zImage situated in arch/arm/boot. This kernel is usable for some devices, however it is not usable for ours. DO NOT EVER EVER FLASH THIS BINARY. I'M NOT RESPONSIBLE FOR ANY BRICKS!!
The third part will help you getting a bootable kernel for your device.

Part 3: Making a bootable kernel
Note: This is a in-progress part so it may be unclear to some people. I will try to do it as much as understandable for everybody.
The kernel binary obtained at the second post is mostly not bootable due to the the fact that the initramfs isn't inclued. The initramfs is the actual ramdisk of your device. To find one... well you must find it (I can't really do anything for you). If you do have one initramfs in a folder, you must specify it in the config file with this current line:
Code:
CONFIG_INITRAMFS_SOURCE=""
Once this has been applied, you can make build this kernel and it should boot
Note that this applies mostly to the model of the 4.0 and 5.0 (and for GB as well). 3.6 and 4.2 uses a different method of using a boot image

One last time...

thanks!! really gonna try this sometimes!!! (once you get part two and three out of the tutorial XD )

If someone is interested in the config file for the Galaxy Player 3.6, he can find it on my GitHub: http://www.github.com/team-hurricane-xda.
How to set it up:
0. Download the config file
1. Rename the config file to aalto-deconfig
2. Copy the file to <kernelsource>/arch/arm/config
3. cd ~/path/to/kernel
4. make aalto-deconfig
5. make
MrBrubble
Sent from my YP-GS1 using xda app-developers app

Build_Error
I've searched and haven't found a straight answer, i get the same build error on every kernel i try to build. Even on this one. Any help is appreciated.
Code:
make: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: Command not found
CHK include/linux/version.h
UPD include/linux/version.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs..
This is in: file system/usr/include/linux>version.h
#define LINUX_VERSION_CODE 197895
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
Anything in particular that should be here?
Also I have tried to use the linaro toolchains and the one included in the ndk.

2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
Can you please explain where I need to put the folders/files to make this cmd work. I am using windows7 if that helps. I currently have them in the C:\ thanks. I am hung up here and would greatly appreciate some extra guidance.

po8pimp said:
2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
Can you please explain where I need to put the folders/files to make this cmd work. I am using windows7 if that helps. I currently have them in the C:\ thanks. I am hung up here and would greatly appreciate some extra guidance.
Click to expand...
Click to collapse
zaclimon said:
...
Requirements: A linux computer
...
Click to expand...
Click to collapse
It's in the OP

seriously I must have totally missed that, I read it over again just to make sure. I will try it again in Ubuntu. Thanks for such a quick reply and apologize for my ignorance. Most things are compiled using Linux, however some I have been doing with windows lately so my assumptions got the best of me it seems. Thanx again

Ok so I am at the point where I need to make the Kernel. I am at this point:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
My question is which .defconfig do I use and how can I find the current one running on my device? I am assuming the best to fit all different platforms would be to chose the "android_hugo_r03_eng_defcongfig". Is this correct. I currently own the USA model if that helps. However I want to be able to help out all models without building 3 different kernels. Thank you in advance.
Here are the options available:
android_hugop2p_r01_eng_defcongfig
android_hugop2p_r01_user_defcongfig
android_hugop2p_r02_eng_defcongfig
android_hugop2p_r02_user_defcongfig
android_hugop2p_r03_eng_defcongfig
android_hugop2p_r03_user_defcongfig
android_hugo_r01_eng_defcongfig
android_hugo_r01_user_defcongfig
android_hugo_r02_eng_defcongfig
android_hugo_r02_user_defcongfig
android_hugo_r03_eng_defcongfig
android_hugo_r03_user_defcongfig
android_hugo_r03_eng_EUR_defcongfig
android_hugo_r03_user_EUR_defcongfig
android_hugo_r03_eng_KOR_defcongfig
android_hugo_r03_user_KOR_defcongfig
android_hugo_r03_eng_USA_defcongfig
android_hugo_r03_user_USA_defcongfig

po8pimp said:
Ok so I am at the point where I need to make the Kernel. I am at this point:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
My question is which .defconfig do I use and how can I find the current one running on my device? I am assuming the best to fit all different platforms would be to chose the "android_hugo_r03_eng_defcongfig". Is this correct. I currently own the USA model if that helps. However I want to be able to help out all models without building 3 different kernels. Thank you in advance.
Here are the options available:
android_hugop2p_r01_eng_defcongfig
android_hugop2p_r01_user_defcongfig
android_hugop2p_r02_eng_defcongfig
android_hugop2p_r02_user_defcongfig
android_hugop2p_r03_eng_defcongfig
android_hugop2p_r03_user_defcongfig
android_hugo_r01_eng_defcongfig
android_hugo_r01_user_defcongfig
android_hugo_r02_eng_defcongfig
android_hugo_r02_user_defcongfig
android_hugo_r03_eng_defcongfig
android_hugo_r03_user_defcongfig
android_hugo_r03_eng_EUR_defcongfig
android_hugo_r03_user_EUR_defcongfig
android_hugo_r03_eng_KOR_defcongfig
android_hugo_r03_user_KOR_defcongfig
android_hugo_r03_eng_USA_defcongfig
android_hugo_r03_user_USA_defcongfig
Click to expand...
Click to collapse
In your case, it is more than just using different configs, sometimes there are more than one config because the different variants of the device uses drivers for other components. If you want to make 1 kernel for all the device, you need to modify it's source so that you can include all the variants drivers. Things like this requires a bit of comparing and programming skills.

I have the zImage created, now I need to make it bootable, can someone please fill me in on what is the next step. I have a bootable kernel to use as a shell if need be. Thank you in advance. This is for the 4.2 by the way.
EDIT: Figured it out I think. I am now running off a new kernel. How do I tell what the actual Kernel Version is? I used the toolchain provided here arm-eabi-4.4.3 to build it. Is there a way to know what the kernel version is from the toolchain?
---------- Post added at 11:04 AM ---------- Previous post was at 10:22 AM ----------
Looking at the readme in the folder for the toolchain, it says this is for ICS. If that is correct, then it is a step in the right direction. Here is the download link to the recovery/kernel
EDIT: removed link to kernel as it does not have wifi working.

po8pimp said:
I have the zImage created, now I need to make it bootable, can someone please fill me in on what is the next step. I have a bootable kernel to use as a shell if need be. Thank you in advance. This is for the 4.2 by the way.
EDIT: Figured it out I think. I am now running off a new kernel. How do I tell what the actual Kernel Version is? I used the toolchain provided here arm-eabi-4.4.3 to build it. Is there a way to know what the kernel version is from the toolchain?
---------- Post added at 11:04 AM ---------- Previous post was at 10:22 AM ----------
Looking at the readme in the folder for the toolchain, it says this is for ICS. If that is correct, then it is a step in the right direction.
Click to expand...
Click to collapse
Code:
cat /proc/version

Meticulus said:
Code:
cat /proc/version
Click to expand...
Click to collapse
thanks I will try that
EDIT: Linux version 2.6.35.7 (gcc version 4.4.3 (GCC))

Related

[HOWTO] Compile modules for stock kernels

I couldn't figure out how to compile a module for stock kernel - I kept getting the following in dmesg:
Code:
<module>: disagrees about version of symbol module_layout
I sent a message to Samsung Open Source Release Center on Friday and received a very helpful response yesterday. Basically, c1_rev02_defconfig contains some debug options that are not set in the actual kernel. These are the options that should not be set in the config:
Code:
CONFIG_DEBUG_PREEMPT
CONFIG_DEBUG_RT_MUTEXES
CONFIG_DEBUG_SPINLOCK
CONFIG_DEBUG_MUTEXES
CONFIG_PROFILING
CONFIG_PERF_EVENTS
CONFIG_PERF_COUNTERS
CONFIG_LATENCYTOP
CONFIG_FTRACE
You can use the attached script to modify all these values (the script was also supplied by Samsung, although it was syntactically incorrect and a couple of modifications were necessary to make it work). I have included a copy of the c1_rev02_defconfig with these modifications.
Using this config, I was finally able to compile modules that can actually be loaded on the device
Kudos to Samsung for sending me this information.
Nice info I guess that will help out the people who had issues with kernel modules on stock ROMs...
jps1974 said:
Kudos to Samsung for sending me this information.
Click to expand...
Click to collapse
No, that is the stuff they should put on their server. Makes you wonder what else they haven't released. Every time they make modifications to the GPL open source code (eg. kernel) and release a new version, they must release the code, and the exact same files they used to build it.
Thanks
That was the info I missed. I have successfully compiled cifs for kf1.
Sent from my GT-I9100 using XDA App
You know guys if there is a basic tutorial available online?.
Thank you!
Hi, I am new to compile modules for android (new to compile kernel anyway)
thanks for your info and config, I am now able to compile modules.
I had a problem on the compiled modules tho, wonder can anyone please point me some direction?
when I insmod the ko, dmesg gives me:
xyz.ko : no symbol version for module_layout
Any hint?
more info, I am compiling like:
I am aiming on compiling to for stock ROM, uname -r > 2.6.35.7-I9100XWKDD-CL161513
- I read, and follow base on http://forum.xda-developers.com/showthread.php?t=1113191
- kernel source from: SHW-M250L kernel source from OSRC, https://opensource.samsung.com/
- .config file of this post, select my wanted modules using make menuconfig
- then make ARCH=arm CROSS_COMPILE=__MYPATH__/bin/arm-none-eabi- modules
Thanks!
Hi,
I'm using insecure kernel :
Code:
#uname -r
2.6.35.7-I9100XWKE2-CL187606
I cross compiled modules using your config file but each time I'm trying to insmod it, I have: failed (Exec format error)
and busybox insmod gives me a invalid module format error
I use the commands :
Code:
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- modules
So I don't really know where I'm wrong here
alx5962 said:
Hi,
I'm using insecure kernel :
Code:
#uname -r
2.6.35.7-I9100XWKE2-CL187606
I cross compiled modules using your config file but each time I'm trying to insmod it, I have: failed (Exec format error)
and busybox insmod gives me a invalid module format error
I use the commands :
Code:
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- modules
So I don't really know where I'm wrong here
Click to expand...
Click to collapse
can you do a dmesg here?
I "think" I am on a same boat as you are on the error tho.....
I didn't checked dmesg, shame on me !
so the error is :
joydev: no symbol version for module_layout
I used your config file, do I need to fix config each time I update with menuconfig ?
alx5962 said:
I didn't checked dmesg, shame on me !
so the error is :
joydev: no symbol version for module_layout
I used your config file, do I need to fix config each time I update with menuconfig ?
Click to expand...
Click to collapse
dmesg is good to read, we are both compiling the same module (joydev)
the config file is not from me, is from jps1974.
no I don't think you need to fix unless you uses the build_kernel.sh unmod, since it cp the defconfig everytime, still I face the same problem...
Instead of SHW-M250L kernel source from OSRC, I just did a quick change to GT-I9100_HK_Opensource.zip
A little bit different on the package, but still the same work flow and results...
.config file:
cp ~/sgs2/9100i_hk/arch/arm/configs/c1_rev02_defconfig ~/sgs2/9100i_hk/kernel/.config
./fix_config.sh
make ARCH=arm CROSS_COMPILE=[PATH_TO_G++LITE_BIN] modules
compile without problem, but no luck, insmod still report:
insmod: init_module '/lib/modules/joydev.ko' failed (Exec format error)
dmesg | grep joy report:
joydev: no symbol version for module_layout
Any help, any directions?
Thanks in advance!!!
I used the european I9100 source from the samsung site and the config file from the opening post when I successfully compiled my modules.
Sent from my GT-I9100 using XDA App
richyy74 said:
I used the european I9100 source from the samsung site and the config file from the opening post when I successfully compiled my modules.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
YES SIR, will do try this src next!!!!!
richyy74 would u mind share with us which kernel are you at on your phone?
and which version of toolchain u are using on the compile?
Thanks.
A bit of update, just try with GT-I9100_Opensource.zip, nope, still no luck........
I start to think would that be problem of toolchain (which in the readme of the zip from Samsung, they are using 2009q3 while I am using the current 2011 build), or it is possible problem because my/our unsecure kernel (2.6.35.7-I9100XWKDD-CL161513)...
update: Roll back on 2009q3, nope, no luck.............
I can only thinks that it is due to the kernel I am using.............
I compiled for ke7 and kf1 cifs, slow-work and cpu governor modules.
I used the 2009 gnu/linux toolchain from codesourcery /it ends with 67 something/
I never succeded with the version mentioned in the readme.
Sent from my GT-I9100 using XDA App
richyy74 said:
I compiled for ke7 and kf1 cifs, slow-work and cpu governor modules.
I used the 2009 gnu/linux toolchain from codesourcery /it ends with 67 something/
I never succeded with the version mentioned in the readme.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
Thanks for your direction, will do more test after my "should have slept" 5 hours session.... which end up in data center instead of bed...
utp said:
Thanks for your direction, will do more test after my "should have slept" 5 hours session.... which end up in data center instead of bed...
Click to expand...
Click to collapse
The "exec format error" means that you compiled it for the wrong architecture.
To see which arch the kernel module was compiled for, use the "file" command (found on any Linux computer but not present on the phone itself).
The file command is an extremely useful function for identifying files.
So, at a terminal, type:
Code:
file -k /user/home/output/example.ko
It should output information on the file, which will clarify whether it was statically built, which architecture, etc. Examples:
Dynamically linked executable:
Code:
"ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped"
Statically linked executable:
Code:
"ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped"
Object file:
Code:
"ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped"
Most importantly, if it doesn't say 32bit ARM, it will not work.
So the module I cross-compiled gives me :
joydev.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped.
So it was correctly compiled, I may need to try another toolchain.
Using Sourcery G++ Lite 2009q3-68 for ARM EABI toolchain, still have the issue.
So as I use an insecure kernel, I may need to ask the author what compiler he used for it.

Problems finding/compiling kernel images for Gen9

Hello, does anyone have a working .config file to compile a kernel that will work on the Archos Gen9 or any links to information specific to what is needed for our devices?
I have tried compiling the kernel from the ICS source on ubuntu 11.10 but I am unable to get it to boot and had to work around many errors just to get it to create the zImage.
sirduke989 said:
Hello, does anyone have a working .config file to compile a kernel that will work on the Archos Gen9 or any links to information specific to what is needed for our devices?
I have tried compiling the kernel from the ICS source on ubuntu 11.10 but I am unable to get it to boot and had to work around many errors just to get it to create the zImage.
Click to expand...
Click to collapse
I know where you can found what you want, you gonna filp out, i'm sure of it
in the root folder of the linux-ics kernel is a file called linux.config, now get things compiled and GOOD LUCK
How set environment for build kernel ICS !
sirduke989 said:
Hello, does anyone have a working .config file to compile a kernel that will work on the Archos Gen9 or any links to information specific to what is needed for our devices?
I have tried compiling the kernel from the ICS source on ubuntu 11.10 but I am unable to get it to boot and had to work around many errors just to get it to create the zImage.
Click to expand...
Click to collapse
HI!
First you need to update your environment ( Ubuntu 11.10) with all the neccessary .lib
- sudo apt-get install gnupg flex bison gperf build-essential zip curl zliblg-dev libc6-dev libncurses5-dev x11proto-dev libx11-dev libreadline-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc gettext make info libsdl-dev libxgtk2.6-dev automake
- download your toolchain => http://forum.xda-developers.com/showthread.php?t=1328027
- copy linux.config into /arch/arm/configs/archos_defconfig
For build zImage :
cd into kernel source directory ...
- export ARCH=arm
- export CROSS_COMPILE=/your directory/arm-archos/usr/bin/arm-linux-uclibcgnueabi-
- make ARCH=arm archos_defconfig
- make -j2
**************That's all *******
.....if you not get errors - you should find zImage into /arch/arm/boot/zImage
Thanks for the info, it appears that my problems may be coming from using an outdated toolchain. Basically I am trying to compile an updated kernel that I can run Ubuntu on but so far my kernel does not even boot to the boot menu that I created or the one in the Ubuntu thread that is using fbmenu.
surdu_petru said:
...
- download your toolchain => http://forum.xda-developers.com/showthread.php?t=1328027
- copy linux.config into /arch/arm/configs/archos_defconfig
For build zImage :
cd into kernel source directory ...
- export ARCH=arm
- export CROSS_COMPILE=/your directory/arm-archos/usr/bin/arm-linux-uclibcgnueabi-
- make ARCH=arm archos_defconfig
- make -j2
**************That's all *******
.....if you not get errors - you should find zImage into /arch/arm/boot/zImage
Click to expand...
Click to collapse
I do not know why it will be a huge size of the compiled kernel modules?
Any idea?
szanalmas said:
I do not know why it will be a huge size of the compiled kernel modules?
Any idea?
Click to expand...
Click to collapse
The kernel modules contain some extra symbol information by default.
You may use the strip command to get rid of those.
Search the kernel Makefile for the command, i'm not sure of the function call right now...
Anyway it doesn't matter in the end, because the modules have the same size when they got loaded to RAM.
BTW, if you use my toolchain, you better unpack it in /opt.
There are some hard coded path's in some of the libraries.
If the toolchain is placed somewhere else you might run into trouble.
See this as well... http://forum.xda-developers.com/showpost.php?p=19134490&postcount=8
If someone needs a 64Bit toolchain built please tell me.
Best regards,
scholbert
scholbert said:
The kernel modules contain some extra symbol information by default.
You may use the strip command to get rid of those.
Best regards,
scholbert
Click to expand...
Click to collapse
Yes, thanks, strip working. strip -g -S -d -x -X *.ko and Hawaii!
Hi!
Thanks to the short information on #3 I was able to compile a kernel image of my own. I was curious to see if we can use another toolchain
like the one from Linaro which uses an 4.7 gcc (it has no specific tweaks for archos device like the toolchain from scholbert, I think).
After some modifications of the kernel (thanks google search!!) it compiles and a zImage was generated...which doesn't booted at all (black screen) :-(
Then a hint came up on planet linaro : "Kernel not booting with Linaro GCC?". I tried it yesterday and it boots
--> Don't expect huge speed improvements (if there any). I get very similar results at the quadrant benchmark compared to the kernel provided by surdu_petru.
My patches to the kernel are located at the patch.txt file.
PS: I would like to try out the android-toolchain 4.7 (ICS), which is also provided by linaro.
It compiles, but at the final linker step a
"DIV usage mismatch between arch/arm/boot/compressed/misc.o and output"
is thrown. Maybe we have to wait once the patch is merged into binutils release - any help on this issue?
UPDATE: DIV usage mismatch solution
I found out, that the linker gold produces problems on my kernel build. So I changed the build process to use the bfd linker which compiles the kernel successfully.
Load the android build toolchain:
Code:
wget --no-check-certificate https://android-build.linaro.org/jenkins/view/Toolchain/job/linaro-android_toolchain-4.7-bzr/lastSuccessfulBuild/artifact/build/out/android-toolchain-eabi-4.7-daily-linux-x86.tar.bz2
Extract it:
Code:
tar xfj android-toolchain-eabi-4.7-daily-linux-x86.tar.bz2
Go into that directory and replace ld which points to ld.gold with that binary of ld.bfd:
Code:
cd android-toolchain-eabi
find . -name "*gold"
cp ./bin/arm-linux-androideabi-ld.bfd ./bin/arm-linux-androideabi-ld
cp ./bin/arm-eabi-ld.bfd ./bin/arm-eabi-ld
cp ./arm-eabi/bin/ld.bfd ./arm-eabi/bin/ld
cp ./arm-linux-androideabi/bin/ld.bfd ./arm-linux-androideabi/bin/ld
Then perform a build as normal.

(Q) First time Compiling

Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
I don't known, maybe gcc
try checking your mount options?
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
SgtPropain said:
Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
Click to expand...
Click to collapse
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
glarepate said:
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
Click to expand...
Click to collapse
just as i thought. that might have happened. its worth a try though.
SgtPropain said:
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
Click to expand...
Click to collapse
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
I actually tried that already.... I have been at this for about three days. XDA was my last resort as I like to figure things out on my own. However I'm stuck @ a brick wall. I have edited /etc/fstab and removed the bs mount options..remounted same error. Mind you I'm doing most of this from a Virtual Environment. Starting to think this is my issue, but it doesn't explain the same error on machine #2. Maybe I'm doing it right, possibly a bad git clone?
thachtunganh said:
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
Click to expand...
Click to collapse
Yeah that would be great if I hadn't done that already. In my post I stated I had replaced the .config from my device. I have literately tried everything but doing this from base. IE not from a VM. I appreciate the help but its a "no go".
Beginning of my .config for proof
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9-ck2
# Wed Apr 11 20:41:44 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
Setting up a third independent machine Ubuntu x86 testing..
where do you get that .config from?
pull /proc/config.gz
SgtPropain said:
pull /proc/config.gz
Click to expand...
Click to collapse
What device are you using, and what kernel are you using.
for the time being you can use prebuilt kernel...no need to build kernel from source....
williamcharles said:
for the time being you can use prebuilt kernel...no need to build kernel from source....
Click to expand...
Click to collapse
He isn't building ROM from source. He is learning how to build a kernel from source.
Sorry for the delay; had 2 deaths in the family.
I setup my third box and again I get the same results. I really don't know where I'm going wrong. This kinda makes me lean to, I have bad source code. I'm no pro C programmer; however when building I get Kconfig errors. I opened said file and the comments look all messed up. The compiler I think is reading the comments as code and kicking it back giving me this error.
by the way what are you compiling and please teach me compiling i want to learn it .
I'm compiling a modified kernel for the Optimus V. I can't teach you how to compile because I don't even know if I'm doing it right.

[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?

Compile kexec support into kernel of acer a3-a20fhd?

I am not sure if this is the right place to ask, so apologies from me if not.
What works (at the moment, I cannot post links, so I spare out the details):
a) I managed to root my acer a3-a20fhd with the help of a windows version of kingoroot.
b) Secondly I finally chrooted successfully into an archlinux armv7-image from archlinux
c) So I could update, install and run xfce-desktop with the help of vncserver and a vcn-client from google's playstore (there are some left even the device is stuck to android 4.4.2).
I wondered if there is a way to add kexec support to the native kernel and then run the linux environment directly on the tab by firing up kexec from the chroot environment.
But I am stuck, is this possible at all?
Following the guide "Building Your First Kernel" from this forum and using the kernel sources from the website of acer, the best I can get is:
Code:
export CROSS_COMPILE="/mnt/sda9/ProjectX/archlinux/acer-a3-a20FHD/toolchain/bin/arm-eabi-"
export ARCH=arm && export SUBARCH=arm
cd /mnt/sda9/ProjectX/archlinux/acer-a3-a20FHD/acer.com/work/kernel/
make menuconfig
/mnt/Data_bb/sda9/ProjectX/archlinux/acer-a3-a20FHD/acer.com/work/kernel/arch/arm/Makefile:237: /mnt/Data_bb/sda9/ProjectX/archlinux/acer-a3-a20FHD/acer.com/work/kernel/mediatek/Makefile: No such file or directory
make: *** No rule to make target '/mnt/Data_bb/sda9/ProjectX/archlinux/acer-a3-a20FHD/acer.com/work/kernel/mediatek/Makefile'. Stop.

Categories

Resources