[Q] conflict between android and linux "chroot' kernel - Transformer TF300T Q&A, Help & Troubleshooting

Hi its me again
I try to install my wireless key "based chipset RTL8187" under backtrack "chroot", but without success, believe in me, I had to go and solve a lot of problems in the "chroot" although I'm almost nil in linux, but now I'm stuck with this problem for several days, following a lot of tutorials here and elsewhere, I show you a few lines of command to develop;
[email protected]:~# modprobe rtl8187
FATAL: Could not load /lib/modules/3.1.10-10.6.1.15.3/modules.dep: No such file or directory
Click to expand...
Click to collapse
trying to install the driver
ifconfig wlan0 down
rmmod r8187 rtl8187 2>/dev/null
wget http://dl.aircrack-ng.org/drivers/rtl8187_linux_26.1010.zip
unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.27.patch
wget http://patches.aircrack-ng.org/rtl8187_2.6.32.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.27.patch
patch -Np1 -i rtl8187_2.6.32.patch
make
make install
make -C /lib/modules/3.1.10-10.6.1.15.3/build M=/sdcard/BT5/rtl8187L_linux_1041.0209.2012/rtl8187 CC=gcc modules
make[1]: Entering directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make: *** [modules] Error 2
make -C /lib/modules/3.1.10-10.6.1.15.3/build M=/sdcard/BT5/rtl8187L_linux_1041.0209.2012/rtl8187 CC=gcc modules
make[1]: Entering directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.1.10-10.6.1.15.3/build'
make: *** [modules] Error 2
Click to expand...
Click to collapse
when I search for Linux realise
[email protected]:~# uname -a
Linux localhost 3.1.10-10.6.1.15.3 #1 SMP PREEMPT Wed May 1 13:26:11 CEST 2013 armv7l GNU/Linux
Click to expand...
Click to collapse
when I search for Linux headers
[email protected]:~# dpkg -l |grep header
ii foremost 1.5.7-bt0 A console program to recover files based on their headers, footers, and internal data structures.
ii libpcap0.8-dev 1.0.0-6 development library and header files for libpcap0.8
ii libssl-dev 0.9.8k-7ubuntu8.6 SSL development libraries, header files and documentation
ii linux-headers-2.6.31-607-imx51 2.6.31-607.13 Linux kernel headers for version 2.6.31 on I.MX51-based systems
ii linux-headers-2.6.32-204 2.6.32-204.16 Header files related to linux-mvl-dove kernel version 2.6.32
ii linux-headers-2.6.32-204-dove 2.6.32-204.16 Linux kernel headers for version 2.6.32 on dove-based systems
ii linux-headers-2.6.33-500 2.6.33-500.6 Header files related to linux-ti-omap kernel version 2.6.33
ii linux-headers-2.6.33-500-omap 2.6.33-500.6 Linux kernel headers for version 2.6.33 on OMAP3-based systems
ii linux-headers-dove 2.6.32.204.7 Generic Linux kernel headers
ii linux-headers-imx51 2.6.31.607.8 Linux kernel headers for imx51 machines
ii linux-headers-omap 2.6.33.500.2 Linux kernel headers -- omap
Click to expand...
Click to collapse
but there is no linux-headers-3.1.10-10.6.1.15.3
Also i installed module-assistant_0.11.6_all.deb and ran this command:
[email protected]:~# su -c 'm-a update && m-a prepare'
Updated infos about 42 packages
Getting source for kernel version: 3.1.10-10.6.1.15.3
apt-get install linux-headers-3.1.10-10.6.1.15.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package linux-headers-3.1.10-10.6.1.15.3
apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
Click to expand...
Click to collapse
but no luck
I know that 3.1.10-10.6.1.15.3 kernel comes from the android Os, so it doesn't exist in the image of backtrack,
what can I do please !! and is there any way to get it work under Android instead of internal wifi ....thanks

what a deception

Related

[GUIDE] How to compile kernel EASIEST WAY + add features + useful tools

Hi guys!
I wrote this guide because after a few month of kernel development i found useful tools and tricks than helped me a lot and speeded up my work and i want to share with you this knowledge.
Setup computer and download sources​
Code:
Minumum reqirement:
* C knowledge
* Ubuntu 12.04 (13.10 if you want use Kdevelop + linux kernel plugin)
* Internet connection, possibly fast and unlimited
* the boot.img of the ROM you want to support with your kernel (AOSP, SENSE etc etc...)
* [URL="http://forum.xda-developers.com/showthread.php?t=2519416"]zImage switcher[/URL]
Install required package:
Linux 12.04;
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
linux 13.10:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and restart your PC.
Download Source:
Go to /home/<username>, create a new folder called "kernel", and enter in that folder.
right click somewhere in "kernel" folder and select "open terminal here" (CooL AH?)
and run
Code:
git clone <kernel-source-code-for-your-device-repository>
for example for HTC One S will be
Code:
git clone https://github.com/CyanogenMod/android_kernel_htc_msm8960.git
Download the toolchain
There are a lot of toolchain, stock, linaro optimized, based on gcc 4.7, based on gcc 4.8 the choice is yours! in this tutorial we use google gcc 4.7 toolchain.
Go to /home/<username>, create a new folder called "toolchains", and enter in that folder.
right click -> open terminal here
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7
Build the kernel​
Build the kernel:
in this part we will work in "/home/<username>/kernels/<kernel-folder>" folder, i'll call it <root>
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
open a terminal window in <root>
type:
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/arm-eabi-4.7/bin/arm-eabi- > compileLog
and the compilation will start.
Some explanation:
"ARCH=arm" tells to compiler what arch the kernel is made for
"CROSS_COMPILE=xxxxxx" tells to "make" the compiler to use
"> compileLog" saves all the messages in a file called compileLog, it's easier to read than terminal window
Click to expand...
Click to collapse
Pack the kernel to boot.img:
Unpack zImage switcher somewhere, i'll call that folder <ZimgSw>.
copy in the same folder of "repack.sh" file the stock boot.img and yout zImage, you can find it in <root>/arch/arm/boot.
run the script
Code:
./repack.sh
now in <ZimgSw> there's a new file called newBoot.img, that's your kernel!
to find the modules (*.ko files) open a teminal windows to <root> and type
Code:
find ./ -name "*.ko" -exec cp {} <absolute/path/destination/folder> \;
now you have the boot.img and the modules, download a custom kernel and use the flashable zip to make your flashable zip, just replace the modules and the boot.img!
Add features​Add features to kernel:
"Woah! i'd like to add intellimand governor to my kernel"
First you need to find a git repository that contains intellimand governor, than the commit that added the governor.
for example https://github.com/rmbq/android_kernel_htc_msm8960/commit/6c87d0e0b3c82ffff8c0704dfde7369872f5602f
Open a terminal window in <root>
type:
Code:
git remote add rmbq https://github.com/rmbq/android_kernel_htc_msm8960.git -b cm-10.2
git fetch rmbq
git cherry-pick 6c87d0e0b3c82ffff8c0704dfde7369872f5602f
Explanations:
Code:
git remote add rmbq https://github.com/rmbq/android_kernel_htc_msm8960.git -b cm-10.2
add a link to https://github.com/rmbq/android_kernel_htc_msm8960.git branch cm-10.2 and called it "rmbq"
Code:
git fetch rmbq
download all the commit history to your PC without modify your sources
Code:
git cherry-pick 6c87d0e0b3c82ffff8c0704dfde7369872f5602f
apply the commit 6c87d0e0b3c82ffff8c0704dfde7369872f5602f to your source
Click to expand...
Click to collapse
in termial window type:
Code:
make ARCH=arm xconfig
will open a new window where you can configure your kernel's features
press ctrl+f (find) and serach for "intellimand" and tick the checkbox. save clicking the floppy disk in upper left corner.
the modified configuration file will be saved in ".config"
now we can build the kernel again, but first type
Code:
make ARCH=arm clean CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi-
this will remove all the compiled files of previous build.
View git commits history​you can easly view all the commits in your repo:
open a terminal window in <root> and type
Code:
gitk
will open a GUI where you can see all the commits, what files were modified for each commit, the author of the commit.
you can also revert commits.
There are other GUI for git, i also like "gitg"
Hacking the kernel
suggested by @pirlano​for easy work on kernel sources, add features & co. you can use kdevelop + linux kernel plugin, here is a guide
http://www.gnurou.org/code/kdevelop-kernel
and a video guide:
http://video.linux.com/videos/kernel-browsing-and-hacking-using-kdevelop
NOTE: for linux kernel plugin ubuntu 13.10 is required
if something is not working or it's not clear or you have useful tips just tell me and i'll update the guide
Nice! I usually use kdevelop + linux kernel plugin, so i have a fast IDE and i can save compilation config, fix warning and errors on the fly, and use git from a gui, it's a good solution for me
pirlano said:
Nice! I usually use kdevelop + linux kernel plugin, so i have a fast IDE and i can save compilation config, fix warning and errors on the fly, and use git from a gui, it's a good solution for me
Click to expand...
Click to collapse
cool! if you want/have time write a small tutorial for your method and i'll add to OP
EDIT: meanwhile i added this guide http://www.gnurou.org/code/kdevelop-kernel
rmbq said:
cool! if you want/have time write a small tutorial for your method and i'll add to OP
EDIT: meanwhile i added this guide http://www.gnurou.org/code/kdevelop-kernel
Click to expand...
Click to collapse
And video guide from a nVidia tegra developer
http://video.linux.com/videos/kernel-browsing-and-hacking-using-kdevelop
Hi rmbq,
many thanks for your tutorial! I really appreciate it as I already made some first steps with compiling Roms. Now I'll try to make a kernel
Sent from my One S using XDA Premium 4 mobile app
UPDATE:
added git GUI section
Thanks for this tutorial. Maybe I will finally sit down to making my own kernel someday. If I can do it for linux why can't I for android.
@rmbq
I get an error when i run the command
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
Click to expand...
Click to collapse
Error
$ sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libqt3-headers
E: Unable to locate package libqt3-mt-dev
Click to expand...
Click to collapse
This is my first time trying to build a kernel, How do i fix it?
Edit:
Im running Ubuntu 13.10
phanitej said:
@rmbq
I get an error when i run the command
Error
This is my first time trying to build a kernel, How do i fix it?
Edit:
Im running Ubuntu 13.10
Click to expand...
Click to collapse
Hi!
instead
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
can you try to run
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and see if "make xconfig" (qt is required only for this command) is working? i haven't got ubuntu 13.10 so i can't test
rmbq said:
Hi!
instead
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
can you try to run
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and see if "make xconfig" (qt is required only for this command) is working? i haven't got ubuntu 13.10 so i can't test
Click to expand...
Click to collapse
Tried the command. Did not get any errors. But after downloading source i dont see the kernel folder insde the kernel. What am i doing wrong?
Im trying to build a hammerhead kernel so used the below link
git clone https://android.googlesource.com/kernel/msm.git
Click to expand...
Click to collapse
phanitej said:
Tried the command. Did not get any errors. But after downloading source i dont see the kernel folder insde the kernel. What am i doing wrong?
Im trying to build a hammerhead kernel so used the below link
Click to expand...
Click to collapse
because "master" branch (the default branch) is empty.
open a terminal in <root> and type
Code:
git checkout android-msm-hammerhead-3.4-kk-r1
and you will switch from master branch to android-msm-hammerhead-3.4-kk-r1 branch, i think it's the more updated branch for hammerhead. now you should see all the folders and files of your kernel
rmbq said:
because "master" branch (the default branch) is empty.
open a terminal in <root> and type
Code:
git checkout android-msm-hammerhead-3.4-kk-r1
and you will switch from master branch to android-msm-hammerhead-3.4-kk-r1 branch, i think it's the more updated branch for hammerhead. now you should see all the folders and files of your kernel
Click to expand...
Click to collapse
First of all, a big thanks to your patience for helping me out.
The above command did show up files. I then went to root and tried to use make
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
Click to expand...
Click to collapse
It gives an error. I made sure the path is correct.
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.
phanitej said:
First of all, a big thanks to your patience for helping me out.
The above command did show up files. I then went to root and tried to use make
It gives an error. I made sure the path is correct.
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.
Click to expand...
Click to collapse
did you do these steps?
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
if yes try to (in <root>):
Code:
make ARCH=arm xconfig
save clickn' the floppy
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
P.S. to post code / script / terminal commands use CODE tag instead QUOTE
rmbq said:
did you do these steps?
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
if yes try to (in <root>):
Code:
make ARCH=arm xconfig
save clickn' the floppy
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
P.S. to post code / script / terminal commands use CODE tag instead QUOTE
Click to expand...
Click to collapse
Thanks for the tip Will use code tag from now on for codes.
After running
Code:
make ARCH=arm xconfig
I got the kernel config window. Saved it without modifying anything. THen ran the other command. Gives error. Checked the log and found few errors.
phanitej said:
Thanks for the tip Will use code tag from now on for codes.
After running
Code:
make ARCH=arm xconfig
I got the kernel config window. Saved it without modifying anything. THen ran the other command. Gives error. Checked the log and found few errors.
Click to expand...
Click to collapse
probably your new .config has got wrong configuration, try to delete .config in <root> (if you don't see it press ctrl+h)
and do again
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
this time run the make command without make xconfig
rmbq said:
probably your new .config has got wrong configuration, try to delete .config in <root> (if you don't see it press ctrl+h)
and do again
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
this time run the make command without make xconfig
Click to expand...
Click to collapse
Still got error
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Just to make sure im doing it right.
I copied hammerhead_defconfig to <root> and renamed it to .config
Then ran the make command without make xconfig i.e
Code:
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
phanitej said:
Still got error
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Just to make sure im doing it right.
I copied hammerhead_defconfig to <root> and renamed it to .config
Then ran the make command without make xconfig i.e
Code:
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
Click to expand...
Click to collapse
can you try to:
open <root>/Makefile
go to line 375 (it's "-fno-delete-null-pointer-checks") and replace this line with "-fno-delete-null-pointer-checks -march=armv7-a"
save and try to compile again
rmbq said:
can you try to:
open <root>/Makefile
go to line 375 (it's "-fno-delete-null-pointer-checks") and replace this line with "-fno-delete-null-pointer-checks -march=armv7-a"
save and try to compile again
Click to expand...
Click to collapse
Edited that, still no go
What am i doing wrong?
phanitej said:
Edited that, still no go
What am i doing wrong?
Click to expand...
Click to collapse
and if you change toolchain?
try to download this http://releases.linaro.org/13.11/co...ndroid-toolchain-eabi-4.8-2013.11-x86.tar.bz2
unpack it in toolchain folder and run make with new CROSS_COMPILE path
CROSS_COMPILE=/home/phanitej/toolchain/new folder/bin/new files name
to know the "new files name" go to
/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin
you can see all files are starting with "arm-linux-androideabi-" that's why the command is
Code:
CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/[COLOR="Red"]arm-linux-androideabi-[/COLOR]
make the same thing with the new toolchain
EDIT: shuold be
Code:
CROSS_COMPILE=/home/phanitej/toolchain/[COLOR="Red"]android-toolchain-eabi[/COLOR]/bin/[COLOR="Red"]arm-eabi-[/COLOR]
EDIT2: if still not working try to modify line 357 of <root>/Makefile from
CFLAGS_KERNEL =
to
CFLAGS_KERNEL = -mtune=cortex-a15 -mfpu=neon-vfpv4

[GUIDE] How to compile kernel for Xperia E3.

This guide is focused on xperia e3 but for other devices process will be simler too.
This guide is not in good shape now i will keep improving it and making it easier and better.
if xperia e3 don,t have too many developers then become one.
Requirements
linux os. -recommended ubuntu 14.04 LTS
(you can install ubuntu on virtualbox or dual boot ubuntu with windows)
cross compiler tool chain -recomended Linaro GCC 4.9.3 optimized for arm-cortex_a7
kernel source code. download it from sony or you can compile my nitrogen kernel only if you have D2212/02 recomended.
unlocked bootloader
tools for building boot.img Download HERE
Sony Kernel
D2202/12 DOWNLOAD
D2203/06/43 DOWNLOAD
Nitrogen Kernel
D2202/12/03/06/43 DOWNLOAD
config for lte varriants is not uploaded but u may find it in your device /proc/config.gz
extarct config from config.gz and rename it to Nitrogen_lte_defconfig and put it in
<kernel source folder>/arch/arm/config/<here>
Setting up Environment in Ubuntu.
boot up ubuntu and open Home directory.
create two new folder.
one with name "toolchain"
one with name "build"
now extract your toolchain to toolchain folder it must contain these folders
Code:
arm-cortex_a7-linux-gnueabihf
bin
include
lib
libexec
share
(depends on toolchain you have)
Extracting Nitrogen source code
if you downloaded zip then extract that zip home dir.
then rename flamingo-kernel folder to kernel
else you can use these commands
Code:
sudo apt-get update
sudo apt-get install git
then
Code:
git clone https://github.com/vinay94185vinay/Flamingo-kernel.git
after that rename flamingo kernel to kernel.
How to extract sony source code
open terminal type
Code:
tar -xjvf
then drag n drop source code file
then hit enter. (it will extract files in home firectory)
open your firmware number folder. eg: 18.5.C.0.19
delete extarnal folder then move/copy "kernel" folder to home dir.
and then extract build tools to build folder.
Compiling.
open an terminal (CTRL+ALT+T) and type
Code:
cd Kernel
(this will change directory to kernel folder.)
then type
Code:
export CROSS_COMPILE=[COLOR="Green"]~/toolchain/bin/[/COLOR][COLOR="Red"]arm-cortex_a7-linux-gnueabihf-[/COLOR]
(red line depend on tool chain and green line on it,s location)
how to find correct red line for toolchain.
open toolchain folder
then bin
in my case it contains files like
arm-cortex_a7-linux-gnueabihf-addr2line
arm-cortex_a7-linux-gnueabihf-ar
arm-cortex_a7-linux-gnueabihf-as
see all files contains that red line.
now you must understood how to know that line.
for sony kernel source code type
For D2202 and D2212
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8226ds_dp_defconfig[/COLOR]
For D2203 and D2206 and D2243
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8926ss_dp_defconfig[/COLOR]
"RED" line make sure that you compile kernel for arm based cpu that is in your android device
if you remove this line you will end up making a kernel for your pc.
"GREEN" is to load an preset default configuration for compiling kernel
it contains what thing,s has to be compiled in this kernel.
for nitrogen kernel source code type
D2202 and D2212
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
D2203 and D2206 and D2243
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_lte_defconfig
Now type for dualcore cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE [COLOR="red"]-j3[/COLOR]
"red" -j3 tell,s compiler to make 3 job,s which is good for intel dual core cpu.
if you have dual core amd cpu it should be better for you to have 2 job,s mean -j2
and -j4 for quard core.
for quard core cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j5
(do it like this cores + 1)
now wait for untill your kernel get compiled.
it may take long time. depend on how fast and how many cores your cpu have.
if you don,t get any error then
you have compiled your kernel :good:.
building boot.img
copy zimage from kernel/arch/arm/boot folder.
to build/msm8226_flamingo/<zimage>
now in msm8226_flamingo folder.
open new_stock_files/<according to your device>/
copy ramdisk. and dt.img to msm8226_flamingo folder.
now open terminal (CTRL+ALT+T) and type
Code:
cd build/msm8226_flamingo/
then
Code:
./makeit.sh
(don,t forget dot.)
now you can see boot.img in build/msm8226_flamingo folder.
now you can flash boot.img with fastboot or flashtool.
feel free to ask if you don,t understand or have error in any step.
RESERVED
adding features.
adding your and kernel name in kernel version.
adding kernel name
in kernel folder you will see Makefile open and edit it.
find these lines.
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=Red]EXTRAVERSION = [/COLOR]
NAME = Saber-toothed Squirrel
write name of kernel next to extraversion (highlited in red)
like this
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=red]EXTRAVERSION = -My_Kernel[/COLOR]
NAME = Saber-toothed Squirrel
adding your name.
open kernel/scripts
edit file called mkcompile_h
find lines like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]build_admin`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=green] ubuntu_builder`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
change red one to your name and green one to your host it will look like this in kernel version.
build_admin@ubuntu_builder
change it like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]my_name`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=red] i_compiled_on[/COLOR]`
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
adding governors and i/o sheduer
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
fixing error.
#1
if you get error with line
Code:
[-Werror=implicit-function-declaration]
like this one
Code:
CC drivers/video/msm/mdss/mdss_dsi_host.o
CC drivers/video/msm/mdss/mdss_dsi_cmd.o
CC drivers/video/msm/mdss/mdss_dsi_panel.o
drivers/video/msm/mdss/mdss_dsi_panel.c: In function ‘mdss_dsi_panel_reset’:
drivers/video/msm/mdss/mdss_dsi_panel.c:291:3: error: implicit declaration of function ‘mdss_dsi_request_gpios’ [COLOR="Red"][-Werror=implicit-function-declaration][/COLOR]
rc = mdss_dsi_request_gpios(ctrl_pdata);
^
cc1: some warnings being treated as errors
make[4]: *** [drivers/video/msm/mdss/mdss_dsi_panel.o] Error 1
make[3]: *** [drivers/video/msm/mdss] Error 2
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
then open makefile in kernel folder and find line
Code:
CFLAGS_KERNEL =
and make it like this
Code:
CFLAGS_KERNEL = -w
then save and exit you will not see that error again.
I will try it
Thanks bro
arpit.j said:
I will try it
Thanks bro
Click to expand...
Click to collapse
export command was incorrect.
i fixed it and added details of it.
hi,
guy,s some info here.
if you compile nitrogen kernel from source code it will give you some extra features that i added in source code after release of Nitrogen 4.1.
nitrogen kernel source code have
- prima wifi drivers
- headset in high performance mode
- zzmove governor
- 30% faster input output
- enhance power efecency with series of NVIDIA patches
- some tweaks for ASoc
- Enabled TCP Congestions like high speed,westwood etc.
if you want these features then compile kernel from source.
i will keep adding features to source code
only D2202 and D2212 is supported.
Don,t forget the poll at top of thread.
any on making any kernel.
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
pjk11 said:
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
Click to expand...
Click to collapse
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
vinay said:
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
Click to expand...
Click to collapse
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
pjk11 said:
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
Click to expand...
Click to collapse
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
vinay said:
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
Click to expand...
Click to collapse
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
pjk11 said:
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
Click to expand...
Click to collapse
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
vinay said:
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
Click to expand...
Click to collapse
Thank you very much, Vinay.
Regards
guide updated.
added link to a guide about adding features to your kernel
if you wan,t to learn anything more just ask me..
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
himfa71 said:
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
Click to expand...
Click to collapse
nothing will happen after that command actually it tells terminal $CROSS_COMPILE is equal to home/username/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
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.
[email protected]:~/kernel$
himfa71 said:
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
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.
[email protected]:~/kernel$
Click to expand...
Click to collapse
did you used git clone or downloaded zip.
TRY
Code:
chmod -R 777 ~/kernel
and ~/kernel is path to folder which contains kernel source code.
i downloaded the zip, and after this "chmod -R 777 ~/kernel" command im still getting same error,
thanks vinay for help, but now im leaving this kernel compiling, thanks.

[Noob Friendly] How to build CM 12.1 for Flamingo

Hello guys,
Soo there was thread made by Vynikal but its some kind of dead and outdated for cm 12.1, i managed to make everything work on my pc and want to help everyone who has problems with building CM12.1 for Flamingo.
ATTENTION!:I or xda-dev are not responsible for any damage to your device,eyes or life, made by hapiness of having cm12.1 built
Requirements:
-Ubuntu 64bit: Tuto
-Stable internet connection, no mobile connection(its not stable enough)
-About 100GB of disk space(if you screw something up you will have some in reserve)
-All fastboot,flashboot and adb drivers installed
-Beefy pc
Lets begin:​We will start with preparations
Lets install JDK.
Code:
sudo apt-get update
then:
Code:
sudo apt-get install openjdk-7-jdk
Now you will need to install build packages, they are needed for building CyanogenMod.
Type this in terminal:
Code:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
You will also need USB access for extracting blobs.
Code:
sudo nautilus
This will open file manager as root.
Now you must go through several steps:
1.Click Computer in the left tray of file manager - you will see some folders like: etc
2.Open Folders etc/udev/rules.d/
3.Create new document and name it: 51-android.rules
4.You can close file manager now.
If you done that 4 steps now we can continue. lets fill up that file.
Copy paste that command to console:
Code:
wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
and change <username> to your ubuntu username. in my case it will look like this:
Code:
wget -S -O - http://source.android.com/source/51-android.rules | sed "s/dominik/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
Now we need to create some directories:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Last thing before loong downloading - repo command:
In terminal type:
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now you will need to open .bashrc with gedit its in home (you will see it if you enable Show hidden files or CTRL+H)
add that at the end of file:
Code:
export PATH=~/bin:$PATH
Now open .profile with gedit same as .bashrc its in default direction
paste this code to that file:
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Initializing the repo:​Type in terminal:
Code:
cd ~/android/system
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
Finally add local_manifest directory and copy-paste file included in attachment(thanks almighty Vynikal)
Code:
Code:
mkdir -p ~/android/system/.repo/local_manifests
And dont-click-the-red-button like command:
Code:
repo sync
And one more command to repair some duplicates in sepolicy
Code:
cd external/sepolicy
git revert 79ff523ac99b339914ccaa754e068072d64da542
Now i have Good and Bad news:
Good: we've done with the preparations.
Bad: this is not the end :silly:
Exporting blobs:​Its kinda tricky now, you will need hiper super duper stock rom and USB debugging toggled on + you need to connect your device to ubuntu, just go to devices/usb and chose your phone (its up in the vm tray)
First make sure that you allowed usb debugging(that window that will pop up in phone)
Once again open .profile and copy-paste this:
Code:
if [ -d "<path-to-sdk>/platform-tools" ] ; then
PATH="<path-to-sdk>/platform-tools:$PATH"
fi
And run that command in terminal to install adb and fastboot drivers.
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
Now enter that commands in terminal:
Code:
cd ~/android/system/device/sony/flamingo
./extract-files.sh
Setting up and preparing our files to building
Code:
cd ~/android/system
. build/envsetup.sh
breakfast flamingo
Build
Code:
brunch flamingo
============================================+#@#+============================================
Thanks to:
[email protected] for creating his tuto for cm12 and manifests
-visi0nary He helped me the most with several problems that we will fix in next post
-Others that i forgot sorry and send me PM (will add you)
pc:
i5 4460
2x g.skill ripjawsx cl7 1600mhz 4gb
took about 2h with ccache
Troubleshooting​Any problems? just post logs and wait for response.
When i was building that CM i had some problems with paths like i said in first post it gave me something like this
Code:
find: `dummy': No such file or directory
find: `../../../../../../external/hamcrest/src': No such file or directory
find: `../../../../../../external/junit/src/org': No such file or directory
find: `../../../../../../external/hamcrest/src': No such file or directory
make: Entering directory `/home/dominik/android/system'
build/core/copy_headers.mk:15: warning: overriding commands for target `/home/dominik/android/system/out/target/product/flamingo/obj/include/qcom/display/copybit.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for target `/home/dominik/android/system/out/target/product/flamingo/obj/include/qcom/display/copybit.h'
build/core/copy_headers.mk:15: warning: overriding commands for target `/home/dominik/android/system/out/target/product/flamingo/obj/include/qcom/display/copybit_priv.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for target `/home/dominik/android/system/out/target/product/flamingo/obj/include/qcom/display/copybit_priv.h'
build/core/Makefile:46: warning: overriding commands for target `/home/dominik/android/system/out/target/product/flamingo/system/bin/wcnss_service'
build/core/base_rules.mk:550: warning: ignoring old commands for target `/home/dominik/android/system/out/target/product/flamingo/system/bin/wcnss_service'
PRODUCT_COPY_FILES vendor/sony/msm8226-common/proprietary/vendor/etc/audio_effects.conf:system/vendor/etc/audio_effects.conf ignored.
No private recovery resources for TARGET_DEVICE flamingo
make -C kernel/sony/msm8974 O=/home/dominik/android/system/out/target/product/flamingo/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/dominik/android/system/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= aosp_yukon_flamingo_defconfig
make[1]: Entering directory `/home/dominik/android/system/kernel/sony/msm8974'
target SharedLib: libm (/home/dominik/android/system/out/target/product/flamingo/obj/SHARED_LIBRARIES/libm_intermediates/LINKED/libm.so)
[B][COLOR="Red"]target SharedLib: libstdc++ (/home/dominik/android/system/out/target/product/flamingo/obj/SHARED_LIBRARIES/libstdc++_intermediates/LINKED/libstdc++.so)
/home/dominik/android/system/out/target/product/flamingo/obj/ETC/file_contexts_intermediates/file_contexts: Multiple different specifications for /sys/devices/virtual/graphics/fb0/rgb (ubject_r:livedisplay_sysfs:s0 and ubject_r:sysfs_display:s0).
Error loading context file from /home/dominik/android/system/out/target/product/flamingo/obj/ETC/file_contexts_intermediates/file_contexts[/COLOR][/B]
make: *** [/home/dominik/android/system/out/target/product/flamingo/obj/ETC/file_contexts_intermediates/file_contexts] Error 4
make: *** Deleting file `/home/dominik/android/system/out/target/product/flamingo/obj/ETC/file_contexts_intermediates/file_contexts'
make: *** Waiting for unfinished jobs....
GEN /home/dominik/android/system/out/target/product/flamingo/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make[1]: Leaving directory `/home/dominik/android/system/kernel/sony/msm8974'
make: Leaving directory `/home/dominik/android/system'
#### make failed to build some targets (02:17 (mm:ss)) ####
i marked that place. visi0nary told me that 2 files has same paths that interfere each other and doesnt allow to continue with build. soo we found solution, but idk if its my fault or its some typo or other kind of mistake
Fix:
1. Go to android/system/device/sony/msm8226-common/sepolicy
2. Open file_contexts in gedit and add # before last line
it should look like this:
Code:
# Trim Area daemon
/dev/socket/tad u:object_r:tad_socket:s0
# CPU governor controls
/dev/socket/mpdecision(/.*)? u:object_r:mpctl_socket:s0
/dev/socket/mpctl u:object_r:mpctl_socket:s0
/dev/pn547 u:object_r:nfc_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/TA u:object_r:trim_area_partition_device:s0
/data/system/default_values u:object_r:mpctl_data_file:s0
/system/bin/sct_service u:object_r:sct_exec:s0
/system/bin/tad_static u:object_r:tad_exec:s0
/system/bin/ta_qmi_service u:object_r:ta_qmi_exec:s0
/system/bin/thermanager u:object_r:thermanager_exec:s0
#/sys/devices/virtual/graphics/fb0/rgb -- u:object_r:sysfs_display:s0
for actual moment cm 12.1 dont work at all
Woah, it's been a long time since I stopped visiting this forum.
Your tut is kinda good, but I can't tell if something has changed in the past.
Actually those blobs you are extracting should be located in this repo, which is also downloaded through local_manifests, so maybe extracting them again is useless.
Bad luck, this device feels abandoned since the begining.
But hey, does it boot? If yes, progress has been made :cyclops:
Vynikal said:
Woah, it's been a long time since I stopped visiting this forum.
Your tut is kinda good, but I can't tell if something has changed in the past.
Actually those blobs you are extracting should be located in this repo, which is also downloaded through local_manifests, so maybe extracting them again is useless.
Bad luck, this device feels abandoned since the begining.
But hey, does it boot? If yes, progress has been made :cyclops:
Click to expand...
Click to collapse
nope dont boot at all at any build
and yeah they should be downloaded with it but somehow when i was compiling it there was error that prevented from building it, after extracting that blobs(something might be missing) everyhing went ok
ps. sorry that i used your thread without permission
MasterDomino said:
nope dont boot at all at any build
and yeah they should be downloaded with it but somehow when i was compiling it there was error that prevented from building it, after extracting that blobs(something might be missing) everyhing went ok
ps. sorry that i used your thread without permission
Click to expand...
Click to collapse
No worries, I have no plans on this forum. My E3 is broken, beaten and scarred. And with Firefox OS installed.
I was always wondering why the hell no CM12 build boots. I guess I won't know anytime soon.
Vynikal said:
No worries, I have no plans on this forum. My E3 is broken, beaten and scarred. And with Firefox OS installed.
I was always wondering why the hell no CM12 build boots. I guess I won't know anytime soon.
Click to expand...
Click to collapse
me and visi0nary found out it's propably fstab because adb not even toggles, its propably problem with mounting :/
Is this will work for all varian?
useone07 said:
Is this will work for all varian?
Click to expand...
Click to collapse
propably not because it doesnt work for my wariant(selinux or fstab problem ) cm 12 works perfectly but on D2203, idk about other wariants.

[GUIDE][AOSP][WIP] Build android from source on windows 10

CURRENT STATUS: can compile android kernel successfully, right now cant compile complete rom.
Edition: Windows 10
Version: 1607
OS Build: 14393.222
===========================================
REQUIREMENTS
===========================================​
1) Windows 10 64-Bit with Anniversary Update
===========================================
Setting up ubuntu bash on windows 10
===========================================​
1) open the Settings --> Update & Security --> For Developers--> enable Developer Mode
2) search for “Turn Windows Features On or Off” in cortana & hit enter
3) Enable the “Windows Subsystem for Linux (Beta)” option in the list and click “OK.” & restart your system
4) search for “bash” in cortana & hit enter
5) type "y" & hit enter
6) download of ubuntu for windows 10 will start. It will take some time depending on your internet speed. You’ll be asked to create a user account and password for use in the Bash environment. restart your system
7) search for “Bash on Ubuntu on Windows” in cortana & hit enter
8) congratulations you have successfully installed bash on windows 10
9) OPTIONAL
add bash to context menu (developer is Manouchehri)
install this reg entry,... Accept the warnings and import it.
===========================================
Setting up a Linux build environment
===========================================​
1) open “Bash on Ubuntu on Windows”
Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install default-jdk
sudo apt-get install android-tools-adb android-tools-fastboot
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip python-networkx
===========================================
How To's
===========================================​
warning 1: do not edit your linux files i.e. "C:\Users<username>\AppData\Local\lxss" in windows,... it will make the files useless in bash... never add files or edit files of linux subsystem from windows,....
Solution: copy the files out of linux sub system i.e. "lxss", edit them, then use bash to move the files back to "lxss"
---------------------------------------------------------------------
warning 2: Do not mnt and download android source,... download the source in linux subsystem (inside lxss) only...
---------------------------------------------------------------------
Problem: where are my ubuntu files
Solution: All your bash files are located in "C:\Users<username>\AppData\Local\lxss\rootfs". your home directory is located in "C:\Users<username>\AppData\Local\lxss\home"
---------------------------------------------------------------------
Problem: sudo: unable to resolve host
Solution: delete hosts file of ubuntu, it will auto generate the next time you open “Bash on Ubuntu on Windows" (C:\Users\<username>\AppData\Local\lxss\rootfs\etc\hosts)
---------------------------------------------------------------------
Problem: Java 8 doesn't install or work
Solution: know bug. use the following code. it will install java 7
Code:
sudo apt-get install default-jdk
---------------------------------------------------------------------
Problem: how to access windows files in bash
Solution: for example you want to navigate to downloads "C:\Users\<username>\Downloads"
Code:
cd /mnt/c/Users/<username>/Downloads
---------------------------------------------------------------------
Problem: repo not found or needs to be installed even after it was successful installed
Solution: use the following command
Code:
nano ~/.bashrc
add this at the end
Code:
PATH=~/bin:$PATH
press Ctrl+o & Ctrl+x
---------------------------------------------------------------------
Problem: can't mount my drive
Solution:: In order for a drive to show up under /mnt/ it must meet the following criteria:
1. The drive must be a fixed drive
2. The drive must be formatted to NTFS
---------------------------------------------------------------------
=======================================
*****still experimenting with bash, still have a few problems to successfully compile the rom,... will update if i find something
Move Home Ubuntu Directory
I can move ubuntu home directory from C to another drive?
@IacobIonut-DW
i am afraid you cant change it,.... there are duplicate files in ubuntu example lxss\text.txt & lxss Text.txt
if you try to copy the folder you will get a error message
It seems interesting I'm going to try it and will give you my feedback .
BTW , I've ubuntu installed along side with windows can I the files on ubuntu partition with the bash installed on windows ?
@LahKeda
No you can't read that drive
Nice to see that guide, great work!
But I am stuck at this point currently: stackoverflow | Bash on Ubuntu on Windows, Compile AOSP.
My strace file says about the same thing.
Did you find any solution to this?
@Spartaner25
did you try to edit files of linux or files of your build in windows???
Wow thanks!
But one question: Is it just another virtualization ? I mean is it faster than an Ubuntu installed inside a VM ?
For performance of bash on windows vs native Ubuntu read this
chiragkrishna said:
@Spartaner25
did you try to edit files of linux or files of your build in windows???
Click to expand...
Click to collapse
I did not touch any files of the linux base (lxss) in either the windows explorer or the bash and I did not modified anything inside the Windows Folder.
But I upgraded the system via apt update/upgrade which should not be destructive (I hope).
My target was a regular aosp build with the tag android-6.0.1_r58, I only changed a few linies in some files in frameworks/base via nano and added a device and kernel folder which was all done inside the bash.
Spartaner25 said:
I did not touch any files of the linux base (lxss) in either the windows explorer or the bash and I did not modified anything inside the Windows Folder.
But I upgraded the system via apt update/upgrade which should not be destructive (I hope).
My target was a regular aosp build with the tag android-6.0.1_r58, I only changed a few linies in some files in frameworks/base via nano and added a device and kernel folder which was all done inside the bash.
Click to expand...
Click to collapse
Try building only the kernel and see if it builds correctly!!
chiragkrishna said:
Try building only the kernel and see if it builds correctly!!
Click to expand...
Click to collapse
Thanks for the hint, the kernel builds fine.
By the way, building CyanogenMod gets stuck here for me.
Windows Insider Preview for those in Fast Ring
Ubuntu 16.04 Arrives With New Windows 10 Build 14936
change log
I'm currently on this version with ubuntu 16.04 and it's getting better.
Currently the build (aosp and cm) ist stuck on the bison binary which is a prebuilt 32-bit ELF, which can not be executed.
It might be possible to replace the prebuilts with their 64-bit variants.
@chiragkrishna upon using
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip python-networkx
I get the following errors: Unable to locate package zip, lib32ncurses5-dev, libgl1-mesa-dev.
Edit: Fixed by removing the '\' from all lines.
does anyone know how to solve this error?
ionice: ioprio_set failed: Invalid argument
I have been able to successfully build cm-13.0 on Windows 10. I haven't been successful with cm-12.1, since it builds 32-bit binaries for the host executables for some reason.
The fixes I had to do:
Recompile flex and bison as 64-bit binaries according to the instructions in their source directory (github btongminh/android_prebuilts_misc)
Disable futexes in Art (github btongminh/android_art)
Disable v8 snapshots, since it is only possible to make snapshots for 32-bit targets on a 32-bit host (github btongminh/android_v8)
The build for Xiaomi Redmi 3 (ido) was successful, flashed it and it booted into Android Unfortunately after that the launcher kept on crashing, but is looks like I'm almost there.
Ayush1325 said:
does anyone know how to solve this error?
ionice: ioprio_set failed: Invalid argument
Click to expand...
Click to collapse
Build with "make bacon" instead of brunch or mka
btongminh said:
I have been able to successfully build cm-13.0 on Windows 10. I haven't been successful with cm-12.1, since it builds 32-bit binaries for the host executables for some reason.
Build with "make bacon" instead of brunch or mka
Click to expand...
Click to collapse
How do you make a user build signed with release keys instead of a userdebug build signed with testkeys??
EDIT: Well my normal make build failed
Please note I'm trying to compile Lineage OS 14.1
Code:
[ 1% 675/34224] Generating TOC: /root...core-all_intermediates/classes.jar.toc
FAILED: /bin/bash -c "(/root/out/host/linux-x86/bin/ijar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ) && (if cmp -s /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; then rm /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ; else mv /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; fi )"
ftruncate(fd_out, GetSize()): Invalid argument
/bin/bash: line 1: 7115 Aborted (core dumped) ( /root/out/host/linux-x86/bin/ijar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp )
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (13:50 (mm:ss)) ####
It looks like I'm having the same error as this person. https://forum.xda-developers.com/lineage/help/building-lineageos-cancro-xiaomi-mi3w-t3530766
What Java version are you using (java -v). LineageOS 14.1 requires Java 1.8.
Link_of_Hyrule said:
Code:
[ 1% 675/34224] Generating TOC: /root...core-all_intermediates/classes.jar.toc
FAILED: /bin/bash -c "(/root/out/host/linux-x86/bin/ijar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ) && (if cmp -s /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; then rm /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ; else mv /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; fi )"
ftruncate(fd_out, GetSize()): Invalid argument
/bin/bash: line 1: 7115 Aborted (core dumped) ( /root/out/host/linux-x86/bin/ijar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar /root/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp )
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (13:50 (mm:ss)) ####
Click to expand...
Click to collapse
I've committed a fix to fix this problem, you can find it here:
https://github.com/imReker/bazel/commit/d2f16b573e0a77653454e64f124e0c4bab3b0fd7

Building LineageOS 16.0

Hi,
I'd ask this in the development forum but unfortunately that has a 10 post minimum, and i currently have 1 post.
I'm trying to compile lineage-16.0 for zerofltexx.
I tried using the local_manifests file from various github repositories (for instance enesuzun2002's and TeamNexus's) but am running into errors with android_hardware_samsung_slsi-cm_exynos7420.
I was wondering if someone could shine some light on how i would go about compiling this.
The errors i am running into are:
hardware/samsung_slsi-cm/exynos7420/mobicore/daemon/Common/CWsm.h:56:33: error: implicit conversion of NULL constant to 'uint64_t' (aka 'unsigned long') [-Werror,-Wnull-conversion]
hardware/samsung_slsi-cm/exynos7420/mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp:217:56: error: unused parameter 'connection' [-Werror,-Wunused-parameter]
To name a few (more information can easily be provided).
Since this repository hasnt been updated in quite some time and there are multiple unofficial roms for the zerofltexx i imagine i am doing something utterly wrong.
Does anyone have any experience with this?
Thanks a lot
Edit:
Building on Ubuntu 18.04
:good:
Use slsi repos of @ripee
ripee-zero
I pushed my local manifests as well
All devving courtesy of enesuzun2002.
ripee said:
github.com/ripee-zero
I pushes my local manifests as well
All devving courtesy of enesuzun2002.
Click to expand...
Click to collapse
Thanks a lot!
I'll try it out
ripee said:
github.com/ripee-zero
I pushes my local manifests as well
All devving courtesy of enesuzun2002.
Click to expand...
Click to collapse
Thanks so much for the help so far, i really appreciate it.
I've tried compiling with your local_manifests and it gets past the errors that i posted before.
It gets all the way to around 96% but unfortunately still gets a build error.
Is this something i've misconfigured?
The current build error is:
Code:
[ 2% 100/3408] Hidden API: /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
FAILED: /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
/bin/bash -c "(rm -f /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar ) && (cp \"/home/subcode/android/lineage/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar\" \"/home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar\" ) && (rm -rf /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (mkdir -p /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (unzip -q /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar 'classes*.dex' -d /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (find /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -name \"classes*.dex\" | sort | sed 's/^/--dex=/' | xargs /home/subcode/android/lineage/out/host/linux-x86/bin/hiddenapi --light-greylist=/home/subcode/android/lineage/out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/home/subcode/android/lineage/out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/home/subcode/android/lineage/out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) && (/home/subcode/android/lineage/out/soong/host/linux-x86/bin/soong_zip -o /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -C /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -D /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (/home/subcode/android/lineage/out/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -stripFile \"classes*.dex\" /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar /home/subcode/android/lineage/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar /home/subcode/android/lineage/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar )"
xargs: /home/subcode/android/lineage/out/host/linux-x86/bin/hiddenapi: terminated by signal 4
[ 3% 105/3408] Building Kernel Config
make: Entering directory '/home/subcode/android/lineage/kernel/samsung/exynos7420'
GEN /home/subcode/android/lineage/out/target/product/zerofltexx/obj/KERNEL_OBJ/Makefile
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
arch/arm64/configs/lineageos_zerofltexx_defconfig:475:warning: override: reassigning to symbol IKCONFIG
#
# configuration written to .config
#
make: Leaving directory '/home/subcode/android/lineage/kernel/samsung/exynos7420'
make: Entering directory '/home/subcode/android/lineage/kernel/samsung/exynos7420'
GEN /home/subcode/android/lineage/out/target/product/zerofltexx/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
make: Leaving directory '/home/subcode/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
12:28:24 ninja failed with: exit status 1
Edit: I've just found something that says its possibly a CPU problem.
Since i'm building inside a VM, i'll try building without a VM to see if this fixes the problem.
Edit2: Unfortunately compiling outside of my VM did not work.
Kyrraz said:
Edit: I've just found something that says its possibly a CPU problem.
Since i'm building inside a VM, i'll try building without a VM to see if this fixes the problem.
Click to expand...
Click to collapse
Reduce the amount of RAM and number of cores assigned to your vm.
ripee said:
Reduce the amount of RAM and number of cores assigned to your vm.
Click to expand...
Click to collapse
Any specific number i should be looking for?
edit: 1 core and 8GB of ram did not change anything, but since the other solution i found said its that i'm missing SSE4.1 support in my cpu im not sure less of anything would be better?
I'll try building on a different CPU, but this will be tomorrow at the earliest unfortunately.
Here's a late update,
Building with a more modern CPU did the trick, apparently you really do need SSE4.1 support.
Thanks a lot!
I have the same error but my CPU have SSE 4.1 support

Categories

Resources