[TUTORIAL][DEV]Compile Kernel for Samsung Galaxy Grand Quattro[GUIDE] - Samsung Galaxy Grand Quattro

Hi everyone,
In computing, the kernel is a computer program that manages input/output requests from software and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system.
When a computer program (in this case called a process) makes requests of the kernel, the request is called a system call. Various kernel designs differ in how they manage system calls (time-sharing) and resources. For example, a monolithic kernel executes all the operating system instructions in the same address space to improve the performance of the system. A microkernel runs most of the operating system's background process in user space, to make the operating system more modular and, therefore, easier to maintain.
For computer programmers, the kernel's interface is a low-level abstraction layer.
Click to expand...
Click to collapse
Here I will provide you the way to compile Kernel for Samsung Galaxy Grand Quattro..
From the begining you have to have the following things for working with the Kernel Development
Code:
[LIST=1]
[*]Knowledge In C Programming Language(Elementary. but a bit more)
[*]Ubuntu Linux or Other Linux Distribuition (Must be 64-Bit)
[*]Working Internet Connection
[*]Knowledge to work with Git(I prefer this to work hasslefree and with Cleanliness)
[/LIST]
If those Above all Criteria are fulfilled by you jump onto This Tutorial

Setup your Linux
Download Ubuntu - > http://releases.ubuntu.com/13.10/ubuntu-13.10-desktop-amd64.iso
Install the Ubuntu 13.10 if you haven't then proceed
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use "sudo" and when to not. It can make things funky if you do something as root that you shouldn't.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
IF YOU ARE USING A VIRTUAL MACHINE, save yourself the trouble and check out my other post here. Otherwise continue on, brave soldier.
First, let's set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you're starting with a fresh Ubuntu base, and even then maybe.
Let's get rid of that. Copy and paste this into a Terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK. If you must keep it, it's possible. But I'm not going to tell you how to do it here. I don't want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10. No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let's make sure the correct version of Java is activated, run the following Terminal command:
Code:
java -version
You should see something like the following:
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8
When that is done installing, run the following command in your Terminal window:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That's it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it's totally worth it when you're basking in the glory of a bunch of people on XDA.
The binary for a program called "repo" will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
In the terminal, navigate to where you would like to store the Android source code. The directions below will make it in your home folder, but if you have limited space, you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
Please hit the "Thanks" button if this post helped you out![/QUOTE]

Downloading the Source and Compiling zImage
First make the directory on which you are going to Compile the Kernel in
Code:
$ mkdir Quattro
$mkdir kernel
$ cd Quattro/kernel
After moving into the Kernel download the Kernel source
Code:
$ git clone https://github.com/yajnab/android_kernel_samsung_msm8625.git -b 8625_samsung ./
After downloading has been completed(It will take an while as size is about 600 MB) you are ready to compile the Kernel.
Now to compile the zImage you need to issue these commands
Code:
$ make delos_defconfig
$ make -jx
(Here x is the number of cores your computer is having, if you are in dilemma its best to use -j2 to avoid overheating of your computer)
You will see various lines where the C files are getting compiled and the modules are made. At the end of the compilation you will find your zImage in the
Code:
arch/arm/boot/[COLOR="Blue"]zImage[/COLOR]
The zImage is your Kernel
So what is the difference bewteen zImage and the Kernel?
Answer:- zImage contains the drivers for your computer to work but you need something called Ramdisk which has to be repacked with the zImage to form a boot.img which can be flashed in your phone.
So what is the Ramdisk?
Answer:- Ramdisk are some files which contains some scripts which initiate your device settings for the kernel to boot up and to frame your device while its booting up.

Packing your boot.img and getting ready to flash it
So ready with the zImage right? Now get prepare to Flash it on your phone
To make the bootimage you need to make a new folder (Not in the folder where your kernel source is)
Lets name the folder as packing
Code:
$ cd ../../
$mkdir packing
$cd Quattro/packing
Lets download the Build Tools
Code:
$git clone https://github.com/yajnab/build_tools.git -b master tools
After the cloning is completed you need to get a boot.img from your stock ROM.
Do the Following things then
Copy the boot.img from the stock Rom to this directory
Copy the Compiled zImage to this directory
so on doing a $ ls it will end up like
Code:
[COLOR="SeaGreen"]/tools[/COLOR] boot.img zImage
On ending up with these do this following..
Code:
$ mkdir unpack
$ cd unpack
$ ../tools/unpackbootimg -i ../boot.img -o unpack
$ rm boot.img-zImage
$ cp ../zImage ./
$ mv zImage boot.img-zImage
$ ../tools/mkbootimg --kernel boot.img-zImage --cmdline 'androidboot.hardware=qcom loglevel=1 vmalloc=200M' --pagesize 4096 --base 0x00200000 --ramdisk_offset 0x01300000 --ramdisk boot.img-ramdisk.gz -o ../new-boot.img
Now download any of the flash-able Kernel zip files and do the following
Make a folder
copy the newboot.img found in the packing folder
from the flash-able zip take the META-INF folder and place with the boot.img
zip them up
Flash it in your phone

More Advacing things will go in here

Credits
I Convey my thanks to these Persons who have helped me in Many ways
My Computer
My BSNL Broadband Connection
My Samsung Galaxy Fit
My Father - Dr. Nachiketa Bandyopadhyay
My Soulmate - Darshana Chatterjee
Friend and Recognized Themer - Crytech
Booting Confimation - Gody
My Tester who inspired(forced in good language) for the kernel - Manoj Kumar
Developers
Adipat
Sakindia123
entropy512
Ezekel
faux123
doomlord
Linus Torvalds
Aditya Fattepurkar
Members of Galaxy Fit group and Linux and Programming Group

What about those *.dtb files? Do I need to copy kernel modules as well ?

Related

(Guide) How to Compile CyanogenMod 7 for Cooper [spaceyway]

Hello Experienced Cooper users
today i shall guide you to compile ur own Cyanogenmod rom
ive adapted this guide to work for cooper
and removed some useless parts wich i self didnt used and still compiled succesfull rom
U MUST RUN A LINUX DISTRO
ok we shall begin now:
1. making the correct directory's
Code:
cd~
mkdir android
mkdir cyanogenmod7
those are the 2 main directorys i will use Note* remember each command is 1 line
Installing Java6 (JDK)
in terminal type / copy paste from here
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk
Install Required dependencies/add-ons
32 bit Linux Mint 14
Code:
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 pngcrush schedtool
copy and paste it all in terminal
64 bit Linux Mint 14
Code:
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 valgrind lib32readline-gplv2-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z-dev pngcrush schedtool
copy and paste it all in terminal
Synching the Source Code of CM7
Code:
cd ~
mkdir bin
paste/type those lines in terminal
now type/paste this in terminal and REBOOT SYSTEM
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
after reboot u can use the Repo Commands
now cd to ur directory we created in the begin
first do
Code:
cd~
then do
Code:
cd android/cyanogenmod7
once done that initialize repo
paste/type this in terminal
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Note: if you wanna have a smaller download and only download specific sources for Cooper try to sync my moddified and reduced repo this still is cm but will not sync all the extra useless files then sync
Code:
repo init -u git://github.com/spacecaker/android_cooper.git -b gingerbread
and do
Code:
repo sync -j4
now u will need to wait
this will sync the approx 10/15 GB source codes
takes about 1/10 hours to sync depending on connection
now lets sync our device configs
once everything has been synched and still in the
Code:
cd android/cyanogenmod7
directory
type
Code:
cd device
mkdir samsung
cd samsung
now
type/paste
Code:
git clone https://github.com/vo-1/android_device_samsung_cooper cooper
once that is synched
do to go to the the root of Cyanogenmod7 directory
Code:
cd ..
cd ..
now we will get the vendor of our cooper device
do type/paste in terminal
Code:
cd vendor
mkdir samsung
cd samsung
and sync the cooper vendor
Code:
git clone https://github.com/vo-1/android_vendor_samsung_cooper cooper
now do
Code:
cd ..
and type
Code:
~/android/cyanogenmod7/vendor/cyanogen/get-rommanager
now lets build
this is how i personally build it on my way but takes more time
i will tell u first my way then original way
do type/paste in terminal
Code:
. build/envsetup.sh
Code:
brunch cooper
then it will compile it and make a zip file for you aswell wich is findable in out folder
Note it takes long time
or do
Code:
lunch cm_cooper-eng
make -j4 bacon
what did i skip ?
i personally skipped ADB and SDK because i run Linux in a Virtual machine
Hope you guys will enjoy this guide
Special thanks to
Vo-1
dastin1015 <- for some basic parts of the guide
if ive missed a part / have isseus with my grammar
do notice me
Sent from my S500 using xda app-developers app
Nice one you really deserve a recognized contributor title dude!
From Gingerbread you need a 64-bit environment to compile succesfully Android. You can remove the part of guide about 32 bit
Paolo_lav said:
From Gingerbread you need a 64-bit environment to compile succesfully Android. You can remove the part of guide about 32 bit
Click to expand...
Click to collapse
for gingerbread 32 bit can be used
also for JB and ICS
but for JB u need to sync extra file
Sent from my S500 using xda app-developers app
Nowhere it is said that you will need Linux. Great guide though. :good:
At the moment I am thinking about some people trying to get sudo to work on their Windows machines.
nikwen said:
Nowhere it is said that you will need Linux. Great guide though. :good:
At the moment I am thinking about some people trying to get sudo to work on their Windows machines.
Click to expand...
Click to collapse
last part i said i run linux in vm
but will add
Sent from my S500 using xda app-developers app
Added a Slimmed Down Repo for Cooper only
wich will sync the device and vendr sources of cooper only and not all the useless stuff
OK,thank you .maybe I will fello you to make a rom,somedays.
Sent from my GT-S5830 using xda app-developers app
@SpaceCaker Bro, PPA No longer exists... Please update the OP with the commands that work.. It has been updated few days ago...
agosain7 said:
@SpaceCaker Bro, PPA No longer exists... Please update the OP with the commands that work.. It has been updated few days ago...
Click to expand...
Click to collapse
i searched a lot on google forbfixed java command
and if u remove the error stop command
you can compile it aswell
Sent from my S500 using xda app-developers app

[How-TO] Building badadroid CM10.1 from source code

Hi all
This is a TUT for building badadroid CM 10 kernel from source code
Step 1 : Setup your build environment
1.Setup Ubuntu 64-bit (I am using 12.04 but i recommend using 11.10)
-http://releases.ubuntu.com/
-It is recommended to install Ubuntu on a 40GB ext4 partition to have enough space for your source code
Step 2 : Install required packages to build a ROM (we are compiling kernel but you can build the ROM too)
-first Run this command to update your package lists
Code:
sudo apt-get update
-Run this command in terminal to download packages (Just copy-paste)(press y and enter when promoted)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
-Run this command to fix an incorrect library with Ubuntu 11.10 and above
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Step 3 : Preparing Repo
-Run these commands (each line is a command)
Code:
mkdir ~/bin
export PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo
chmod a+x ~/bin/repo
if any error happen with these commands don't ever re-run it with sudo(I did that mistake before )....post your error
Step 4 : Downloading Repo sources(maybe later we can separate kernel source from ROM)
-Run these commads
Code:
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/jellybean/local_manifest.xml
cd ..
repo sync -j8
Notes
-repo sync command will take really a lot of time to finish depending on your Internet connection speed (about 10 GBs of download)
-If you just want to pause this download and continue later just close terminal then when you want to continue run these commands
Code:
cd ~
cd wave
repo sync -j8
Step 5 : Including tools for the build
-Run these commands just one time
Code:
cd vendor/cm/
./get-prebuilts
cd ../../
-Then run this command before each build
Code:
. build/envsetup.sh
Step 6 : Building
-To build kernel run these commands
Code:
lunch cm_wave-userdebug
make bootimage
-To build ROM run this command
Code:
brunch wave
Big Thanks to:
-Linux developers
-badadroid team
-CM 10 developers
-xda-university
-anyone i forgot to mention
Got any Questions just ask
Best Regards
For repo sync a "-j8" mean make 8 downloading pattern at same time, better if you use more like 32 for more fast downloading
For brunch wave -j2 mean use double core if you got 4 core then -j4
You can install :
sudo apt-get install ccache
add "export USE_CCACHE=1" without quote on your /home/USER/.bashrc
Then command like this :
ccache -M 6 (mean 6giga cache)
ccache -C clear all cache
ccache -c clean old cache
I felt free to translate this tutorial into German...
You can red German version here...
Good. Just btw - it ain't no CM10.1 but 10.0. ;]
Thank u so much for the guide. (mylove90 and Tigrouzen)
What exactly does this badadroid look like and does it mean the samsung bada os + the android os merged together. And How does it work?
Sent from my GT-I9300 using xda premium

[ GUIDE ] How to Prepare Ubuntu 14.04 LTS Trusty Tahr to Compile Android ROMs

--- If you would rather use a ready-to-go Virtual Machine, check out my post here. ---
--- Copied with permission from http://nathanpfry.com ---
TLDR; if you don't care about an explanation of what your system is doing,
click here to check out XDA Senior Member Aaahh's sweet two-step method based on my guide below.
Otherwise, keep reading!​
With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. 14.04 Trusty Tahr is the next Long Term Support edition of the popular Linux distro. The aim of this guide is to simplify the configuration process for you.
Follow the directions step-by-step. All you have to do is copy and paste the code sections in order and you will be up and running in no time!
This guide applies to all variations of Ubuntu 14.04 LTS Trusty Tahr 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use "sudo" and when to not. It can make things funky if you do something as root that you shouldn't.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin? Ok.
1) Unless it's a completely fresh Ubuntu installation, many of you may have the wrong version of Java installed. Let's fix that first.
The command below makes sure you're starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
If necessary, follow the on-screen instructions to remove any previous versions. Otherwise, move on to the next step.
It's time to install Java, one of the core pieces for compiling Android ROMs. Depending on which version of Android you are building, you will need the corresponding version of the Java Development Kit.
*** IF YOU ARE BUILDING ANDROID GINGERBREAD THRU KITKAT (2.3 - 4.4.x) USE THESE INSTRUCTIONS FOR JDK 6***
2) Copy and paste the following into the terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 14.04.
3) Now you need to install the package. More copy-paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You must accept the Licensing Agreement to complete the install.
Press Enter to acknowledge the "OK", then tab over to "Yes" and press Enter again to accept the license. The installation will continue automatically.
4) Let's make sure the correct version of Java is activated. Run the terminal command:
Code:
java -version
You should see something like:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Continue to Step 5.
*** IF YOU ARE BUILDING ANDROID L AND ABOVE (CURRENT AOSP MASTER BRANCH) USE THESE INSTRUCTIONS FOR JDK 7***
2) Install Open-JDK 7 for the necessary Java development tools.
Code:
sudo apt-get update && sudo apt-get install openjdk-7-jdk
Follow the on-screen instructions.
3) Let's make sure the correct version of Java is activated. Run the terminal command:
Code:
java -version
You should see something like OpenJDK 1.7
Continue on to Step 5.
5) Back to a fresh terminal prompt. Install the main build tools with this command:
Code:
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng
That's it on the package side of things. You guessed it, time for more Terminal. This really is the easiest way, I promise.
6) A program called "repo" lets you communicate with git servers and download all that precious source code. The next command will install it:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
7) Use your favorite text editor to open ~/.bashrc - I like nano:
Code:
sudo nano ~/.bashrc
8) At the very bottom (use the Page Down key) paste this code to a new (empty) line:
Code:
export PATH=~/bin:$PATH
9) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
10) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
Code:
mkdir ~/android
cd ~/android
11) Now you're going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of the tutorial, here's the command for AOKP KitKat:
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b kitkat
12) Almost there. Last step, it's a doozy. Time to get the source. Prepare yourself, 10+ GB of downloading await.
Don't worry, it's automated. Go to sleep. Eat something. Perhaps you have heard of this new thing the kids are doing called "going outside"? Yeah, I didn't think so. Me neither.
Hey everyone, it's the final terminal command:
Code:
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
That should be everything. Now you're ready to build Android the right way. Good luck!
For those of you that want to build Lollipop (which requires JDK 1.7) but already have your system configured for GB-KK (JDK 1.6), here's the easiest way to update your system:
First, install OpenJDK7. At a terminal:
Code:
sudo apt-get install openjdk-7-jdk
Once that completes, you simply need to tell Linux to use the newer version of Java and Java Compiler to render content. Run the following two commands separately, making the correct selection for OpenJDK 1.7 both times when prompted. Again in the terminal:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
That should do the trick! Have fun everyone..
Feel free to buy me a coconut water (donate) if you like my work. It would be greatly appreciated!
Please hit the "Thanks" button if this post helped you out!​
not for me...
ppa:webupd8team/java no longer supports oracle-java6-installer.....
at least when I tried it on ubuntu 14.04 a week ago......
had to resort to the old fashion way of installing jdk from older oracle instructions...!!!
UPDATED:
----------------
seems at the time we tested(feb.4) it did not work but since then has been fixed...
at the time the OP posted it had been corrected, feb.7
fgdn17 said:
had to resort to the old fashion way of installing jdk from older oracle instructions...!!!
Click to expand...
Click to collapse
Respectfully, you're wrong.
Yesterday I tried the instructions (as I was writing the guide) with the latest Alpha of Xubuntu 14.04 and it works fine.
It appears they've updated the PPA within the last few days to support Trusty Tahr.
I wouldn't publish a guide that I hadn't verified myself as working, unlike some people.
well that implies they have fixed it...because on feb 4 we setup Ubuntu 14.04 and had to work around the issue
because it did not work.....
so did it work well for you a week ago???
maybe because of the different systems???
will give it a try again in the next couple of weeks if we get time...either way it's good to know
it has been corrected....
and BTW we also installed openjava 7, switched between the two and
build our source without issues.....
source was android-x86 kitkat
got a chance to check this am and it was FIXED YESTERDAY it appears.....
https://launchpad.net/~webupd8team/+archive/java
https://launchpad.net/~nilarimogard/+related-packages
and as stated did not work a week ago....feb.-1 thru feb 4
thanks for the updates...
fgdn17 said:
got a chance to check this am and it was FIXED YESTERDAY it appears.....
Click to expand...
Click to collapse
That's great, but your first post is still wrong. You should edit it so other users aren't confused.
oracle-java6-installer works perfectly fine in Ubuntu 14.04 at the time of the original posting.
I used 14.04 early and i had to install some extra packages because things wouldn't work properly, just a heads up incase anyone is having problems...
I've build android 4.2 and 4.4 using openjdk 1.7, without any changes, using ubuntu 13.10 (some time ago in aosp there has been added patches which fixes build under java 7, of course it's not for all android versions).
This guide really complicates things. Most of this could be put into a single one-liner.
I appreciate a detailed, step-by-step guide like this. In my experience here, I've found that far too many arrogant developers hold the opinion that since they had to find things out the hard way, everyone else should have to as well. Finding developers that actually want to help people out, rather than snub them with snot-nosed attitudes, is always refreshing, so thanks to the OP for the guide!
AdamOutler said:
This guide really complicates things. Most of this could be put into a single one-liner.
Click to expand...
Click to collapse
Then why haven't you done it already, instead of raining on my parade?
sylentprofet said:
Then why haven't you done it already, instead of raining on my parade?
Click to expand...
Click to collapse
Do you want me to post a second guide mid-thread? I'm just suggesting combining steps. Its a lengthy read and it could be much shorter.
AdamOutler said:
Do you want me to post a second guide mid-thread? I'm just suggesting combining steps. Its a lengthy read and it could be much shorter.
Click to expand...
Click to collapse
Or start your own thread?
If you wanna post it in here as a reply, go ahead. When I can verify that it works I'd be happy to update the OP and credit you.
Also I've released Builduntu, a ready-to-go virtual machine. The link is at the top of the OP. No matter what system you've got (OSX, Win, other linux) you can import the machine into VirtualBox or VMWare and have a working development environment in minutes.
Now that I've built a completely new, modern machine, I'm going to repurpose my old system (which is still perfectly usable, with 8GB of RAM and an Intel Core2 Quad) as an Android development platform. I plan to install Linux Mint 14 on it, as I despise Unity with the blazing white heat of a million suns. I'll give your steps a try on it and post here how successful they were; if anything needs tweaking for Mint, you can add them to your instructions (it shouldn't, as Mint is based on Ubuntu).
AdamOutler said:
This guide really complicates things. Most of this could be put into a single one-liner.
Click to expand...
Click to collapse
Here is a two liner,
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* && sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer && sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python && sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so && mkdir ~/bin && curl http://commondatastorage.googleapis....downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo && sudo nano ~/.bashrc
Copy and paste
export PATH=~/bin:$PATH
Code:
source ~/.bashrc && mkdir ~/android && cd ~/android
I purposly left out the repo init and sync, that way you can pick what source to init.
Aaahh said:
Here is a two liner,
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* && sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer && sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python && sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so && mkdir ~/bin && curl http://commondatastorage.googleapis....downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo && sudo nano ~/.bashrc
Copy and paste
export PATH=~/bin:$PATH
Code:
source ~/.bashrc && mkdir ~/android && cd ~/android
I purposly left out the repo init and sync, that way you can pick what source to init.
Click to expand...
Click to collapse
Yep. you beat me to it.. I was mobile earlier so I couldn't really copy-pasta all of it into a post.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential : Depends: gcc (>= 4:4.4.3) but it is not going to be installed
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
g++-multilib : Depends: cpp (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: gcc-multilib (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: g++ (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: g++-4.8-multilib (>= 4.8.2-5~) but it is not going to be installed
libghc-bzlib-dev : Depends: libghc-base-dev-4.6.0.1-8aa5d
Depends: libghc-bytestring-dev-0.10.0.2-4f932
E: Unable to correct problems, you have held broken packages.
may i request some suggestion? thanks
desalesouche said:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential : Depends: gcc (>= 4:4.4.3) but it is not going to be installed
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
g++-multilib : Depends: cpp (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: gcc-multilib (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: g++ (>= 4:4.8.2-1ubuntu4) but it is not going to be installed
Depends: g++-4.8-multilib (>= 4.8.2-5~) but it is not going to be installed
libghc-bzlib-dev : Depends: libghc-base-dev-4.6.0.1-8aa5d
Depends: libghc-bytestring-dev-0.10.0.2-4f932
E: Unable to correct problems, you have held broken packages.
may i request some suggestion? thanks
Click to expand...
Click to collapse
try sudo apt-get autoremove then sudo apt-get update then sudo apt-get dist-upgrade then sudo dpkg --configure -a then if it still perist try to enable muitverse, if it still doesn't work then try trusty proposed or compiling by hand...
Aaahh said:
try sudo apt-get autoremove then sudo apt-get update then sudo apt-get dist-upgrade then sudo dpkg --configure -a then if it still perist try to enable muitverse, if it still doesn't work then try trusty proposed or compiling by hand...
Click to expand...
Click to collapse
all is fine now... thanks to these commands i could run point 5 and 6 from op
hi <while compiling cm11 on that fresh install of unbutu 14.04 i have that weird error? any idea? thank you.
Can't locate Switch.pm in @Inc (you may need to install the Switch module
@Inc contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
Import includes file: /home/desalesouche/cm11m3/out/target/product/u8860/obj/STATIC_LIBRARIES/libwebcore_intermediates/import_includes
make: *** [/home/desalesouche/cm11m3/out/target/product/u8860/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
edit: i think i foound the solution here
http://answers.yahoo.com/question/index?qid=20130510115737AAfIgU5
hi did in terminal :
cpan App::cpanminus
then i choosed solution with sudo.
then i did in new terminal:
cpanm Switch
i restarted cm build and error seem to be gone... will confirm that.

[Q] Getting started help

I am using ubuntu 15.04 vivid vervet and I just setup my rom building environment using these steps:With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. The aim of this is to simplify the configuration process for you.
Follow the directions step-by-step. All you have to do is copy and paste the code in order and it will be up and running in no time!
This guide applies to all variations of Ubuntu 15.04 Vivid Vervet 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin? Ok.
1) Unless it’s a completely fresh Ubuntu installation, many of you have the wrong version of Java installed. Let’s fix that first.
The command below makes sure you’re starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Install the main build tools with this command:
sudo apt-get install openjdk-7-jdk openjdk-7-jre git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev
3) When those are done installing, run the next line in your terminal window:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
4) A program called “repo” lets you communicate with git servers and download all that precious source code. The next command will install it:
mkdir ~/bin && curl ttp://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
5) Use your favorite text editor to open ~/.bashrc – I like nano:
sudo nano ~/.bashrc
6) At the very bottom (use the Page Down key) paste this code to a new line:
export PATH=~/bin:$PATH
7) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
source ~/.bashrc
8) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external (even 3.0) will be comparatively slow. Here we go:
mkdir ~/android
cd ~/android
9) Now you’re going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of the tutorial, here’s the command for SimpleAOSP Lollipop:
repo init -u ttps://github.com/SimpleAOSP-Lollipop/platform_manifest.git -b L
10) Last step, it’s a doozy. Time to get the source. Prepare yourself, many gigabytes of downloading await.
Don’t worry, it’s automated.
Hey everyone, it’s the final terminal command!
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
That should be everything. Now you’re ready to build Android. Good luck! .... After I do all of that what do I need to do next to get started? Is that all I need TO get started? thank you for all of your help!
XxInSaNeClOwNxX said:
I am using ubuntu 15.04 vivid vervet and I just setup my rom building environment using these steps:With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. The aim of this is to simplify the configuration process for you.
Follow the directions step-by-step. All you have to do is copy and paste the code in order and it will be up and running in no time!
This guide applies to all variations of Ubuntu 15.04 Vivid Vervet 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin? Ok.
1) Unless it’s a completely fresh Ubuntu installation, many of you have the wrong version of Java installed. Let’s fix that first.
The command below makes sure you’re starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Install the main build tools with this command:
sudo apt-get install openjdk-7-jdk openjdk-7-jre git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev
3) When those are done installing, run the next line in your terminal window:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
4) A program called “repo” lets you communicate with git servers and download all that precious source code. The next command will install it:
mkdir ~/bin && curl ttp://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
5) Use your favorite text editor to open ~/.bashrc – I like nano:
sudo nano ~/.bashrc
6) At the very bottom (use the Page Down key) paste this code to a new line:
export PATH=~/bin:$PATH
7) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
source ~/.bashrc
8) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external (even 3.0) will be comparatively slow. Here we go:
mkdir ~/android
cd ~/android
9) Now you’re going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of the tutorial, here’s the command for SimpleAOSP Lollipop:
repo init -u ttps://github.com/SimpleAOSP-Lollipop/platform_manifest.git -b L
10) Last step, it’s a doozy. Time to get the source. Prepare yourself, many gigabytes of downloading await.
Don’t worry, it’s automated.
Hey everyone, it’s the final terminal command!
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
That should be everything. Now you’re ready to build Android. Good luck! .... After I do all of that what do I need to do next to get started? Is that all I need TO get started? thank you for all of your help!
Click to expand...
Click to collapse
Technically, you should still download the device specific and vendor code. But that's it.
Inviato dal mio SM-G900F utilizzando Tapatalk
When I ran the command to get the source, about forwards the end the terminal asked for a github password. What do I do?
XxInSaNeClOwNxX said:
When I ran the command to get the source, about forwards the end the terminal asked for a github password. What do I do?
Click to expand...
Click to collapse
I think you should put in your github account password.
helpp
NeoLogY said:
I think you should put in your github account password.
Click to expand...
Click to collapse
I did but I got denied!

[GUIDE] How to compile a custom kernel for OnePlus 2

Hi all...
Happy Holidays
I have been looking around haven't found a tutorial on compiling kernel for oneplus2, so i decided on making one for those who are new to compiling kernel from source.
This tutorial will be divided into 3 parts...
>Preparing the build environment... (Ubuntu 16.04 LTS).
>Downloading source code, Toolchain and compiling.
>Testing
######################################################################
Preparing the build environment
Preparing the build environment is easy. If u haven't install Ubuntu yet, check out how to dual-boot alongside windows from here.
If u are looking for something easier like running it from a virtual machine check out this.
Right now i have Ubuntu 16.04 LTS installed which i will be using.
Once u have booted into Ubuntu, it's time to head to the terminal.
Lunch the terminal by right clicking on desktop an select "open terminal"
Once in terminal type in these commands individually (note: some commands will prompt u to type y and enter):
Code:
sudo apt-get install synaptic
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Installing repo...
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Installing Java...
Code:
sudo add-apt-repository ppa:webupd8team/java
Code:
sudo apt update; sudo apt install oracle-java8-installer
Code:
sudo apt install oracle-java8-set-default
Run this command to check if Java is installed correctly:
Code:
javac -version
If it says something like this (javac 1.8.0_111) then u are good to go.
That's it for preparing the build environment. Easy... right.:highfive:
######################################################################
Downloading source code, Toolchain and compiling
Now it's time to download the source, u will be creating a folder to download the source in so type to commands below,
Code:
mkdir oneplus2-kernel
Code:
cd oneplus2-kernel
(The folder can be found in the home directory)
If u are building for cm, download the kernel source using command below...
Code:
git clone https://github.com/CyanogenMod/android_kernel_oneplus_msm8994.git
If u are building for other rom use this one...
Code:
git clone https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994.git
Once download is completed, u need to download the toolchain which is the tool used in compiling the kernel.
It can be downloaded from here.
When download completed, move the zip file to the oneplus2-kernel folder u made earlier and then right click and select extract here.
U can now delete the zip file when extracted. So now u would have 2 folders to in ur oneplus2-kernel folder. One is the kernel and the other is the toolchain.
Time to compile the kernel... But first u need to point the variable to toolchains path. To do this, u need to go to the kernel source, folder(which is called android_kernel_oneplus_msm8994 in the oneplus2-kernel folder) right click and open in terminal, then run the command
Code:
export CROSS_COMPILE=/home/[B]"UR_USERNAME"[/B]/oneplus2-kernel/aarch64-linux-android-4.9-uber-master/bin/aarch64-linux-android-
(NOTE:Replace "UR_USERNAME" with the name u used when installing ubuntu)
Now run the commands below in the same terminal:
Code:
export ARCH=arm64
Code:
export SUBARCH=arm64
Code:
export USE_CCACHE=1
U will need to locate the defconfig file. If u are compiling for cm, the file name will be "cm_oneplus2_defconfig", and for the other source, name will be "msm8994-OnePlus2_defconfig". It is located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/configs/...
(Note: The defconfig file may vary for different roms ur building for so pay attention to that.)
So if u are compiling for cm, run the command:
Code:
make cm_oneplus2_defconfig
to add it to the config file. Change name of defconfig file accordingly as said above.
Now it's time to give ur kernel a name so run the command:
Code:
make menuconfig
This will look like when u boot into the BIOS, so use the arrow keys to navigate. This menu allows the u to choose the features of the kernel (and other options) that will be compiled. To add the name, go to "General setup" then "(-perf) Local version - append to kernel release", then type in the name for ur custom kernel and save/exit.
Finally type this command to compile...
Code:
make -j2
(Replace -j2 with the number of cpu cores)
IF (make -j2) gives errors try:
Code:
make
This will take A WHILE, so let it do it's ting.
If it compiled without errors, u will find the kernel file named "Image.gz-dtb" located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/...
:good:SUCCESS:good::victory:
If FAILED:crying: , u can post a screen-shot of ur error below and i will try an help u out.
######################################################################
Testing
Time to test ur newly built kernel, since everything went smoothly and u cant wait to boot it up.
Well download this flashable zip from here.
Open the zip file using Archive Manager without extracting.
Delete the file named "Image.gz-dtb" and replace with ur kernel located at /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/Image.gz-dtb.
That's it...Just copy the zip to ur device and flash away...
As i said early... any problem u are having with compiling, just post a screen-shot of ur error below and i will try an help u.
:good:REMEMBER TO HIT THANKS/LIKE:good:
reserved
So I've decided to give this a try today. Run into a slight problem though.
1. When I execute make msm8994-OnePlus2_defconfig I receive an error 'make: Nothing to be done for msm8994-OnePlus2_defconfig'. This file did already exist under the folder structure.
2. When I execute make menuconfig I receive an error 'No rule to make target menuconfig. Stop'.
Any ideas to what I am doing wrong?
Thanks in advance.
Woodzrul said:
So I've decided to give this a try today. Run into a slight problem though.
1. When I execute make msm8994-OnePlus2_defconfig I receive an error 'make: Nothing to be done for msm8994-OnePlus2_defconfig'. This file did already exist under the folder structure.
2. When I execute make menuconfig I receive an error 'No rule to make target menuconfig. Stop'.
Any ideas to what I am doing wrong?
Thanks in advance.
Click to expand...
Click to collapse
It been a while but I'll try to help ima assume you building the latest lineage kernel right? If so use
make oneplus2_defconfig
Then
make -j4
The menu config is to name the kernel if you want to it appears after the Linux version default is often perf+, but not required
example: 3.10.93 perf+
Appreciate the prompt response. I shall give this ago. Have clicked the Thanks! button.
Brandon Indar said:
reserved
Click to expand...
Click to collapse
Sir I'm trying to compile from boeffla kernel sources But I'm just stuck here...i also tried "make cm_oneplus2_defconfig" but no use I followed all the below steps also installed java and I'm on Ubuntu 17.04 (dualboot)..
Any help would be appreciated
Prathamesh Kapure said:
Sir I'm trying to compile from boeffla kernel sources But I'm just stuck here...i also tried "make cm_oneplus2_defconfig" but no use I followed all the below steps also installed java and I'm on Ubuntu 17.04 (dualboot)..
Any help would be appreciated
Click to expand...
Click to collapse
Hi...
What error exactly u are getting when u running the command:
"make cm_oneplus2_defconfig"
Sent from my ONE A2005 using Tapatalk
Brandon Indar said:
Hi...
What error exactly u are getting when u running the command:
"make cm_oneplus2_defconfig"
Click to expand...
Click to collapse
The error wguch i get always is "make: *** No rule to make target 'cm_oneplus2_defconfig'. Stop"
Edit:the error can be seen in the attachment
---------- Post added at 04:17 AM ---------- Previous post was at 04:11 AM ----------
Prathamesh Kapure said:
The error wguch i get always is "make: *** No rule to make target 'cm_oneplus2_defconfig'. Stop"
Edit:the error can be seen in the attachment
Click to expand...
Click to collapse
Edit 2:At first one of my developer frnd said try "make boeffla_defconfig" it didn't work thwn he said try "make cm_oneplus2_defconfig" this also didn't work so i thought i might post it here and get some help..
Prathamesh Kapure said:
The error wguch i get always is "make: *** No rule to make target 'cm_oneplus2_defconfig'. Stop"
Edit:the error can be seen in the attachment
---------- Post added at 04:17 AM ---------- Previous post was at 04:11 AM ----------
Edit 2:At first one of my developer frnd said try "make boeffla_defconfig" it didn't work thwn he said try "make cm_oneplus2_defconfig" this also didn't work so i thought i might post it here and get some help..
Click to expand...
Click to collapse
Look at the arch/boot/arm64/configuration inside the kernel source and the files in there will give you an idea what you can build the usually one is oneplus2_defconfig sometimes developers will make another Defconfig and you'll find it there. typically for LineageOS oneplus2_defconfig is the one used.
After looking at boeffla source cm Defconfig is old and prob will break something, "make boeffla_defconfig" should work and make sure your inside the kernel source as you do the make Defconfig command
Dr_DjEnder said:
Look at the arch/boot/arm64/configuration inside the kernel source and the files in there will give you an idea what you can build the usually one is oneplus2_defconfig sometimes developers will make another Defconfig and you'll find it there. typically for LineageOS oneplus2_defconfig is the one used.
After looking at boeffla source cm Defconfig is old and prob will break something, "make boeffla_defconfig" should work and make sure your inside the kernel source as you do the make Defconfig command
Click to expand...
Click to collapse
Ok Thank you sir.. I'll try and report
Offtopic: Do u know any of our whatsapp and telegram group? If so can u plz add me
Dr_DjEnder said:
Look at the arch/boot/arm64/configuration inside the kernel source and the files in there will give you an idea what you can build the usually one is oneplus2_defconfig sometimes developers will make another Defconfig and you'll find it there. typically for LineageOS oneplus2_defconfig is the one used.
After looking at boeffla source cm Defconfig is old and prob will break something, "make boeffla_defconfig" should work and make sure your inside the kernel source as you do the make Defconfig command
Click to expand...
Click to collapse
Sir i tried but no use i get same error but i just noticed some bottom commands show a bit different error "make: Nothing to be done for 'oneplus_2' and also for 'make boeffla_defconfig'
Prathamesh Kapure said:
Sir i tried but no use i get same error but i just noticed some bottom commands show a bit different error "make: Nothing to be done for 'oneplus_2' and also for 'make boeffla_defconfig'
Click to expand...
Click to collapse
Have u set up the cross compiler and run the commands in the root of the kernel source folder before using make command. If so, run command: "make menuconfig".
If that fails that means the cross compiler isn't set up right.
Sent from my ONE A2005 using Tapatalk
Brandon Indar said:
Have u set up the cross compiler and run the commands in the root of the kernel source folder before using make command. If so, run command: "make menuconfig".
If that fails that means the cross compiler isn't set up right.
Click to expand...
Click to collapse
Yaa sir it already setup cross compiler... Then after i downloaded los sources and tried with them and the kernel got compiled successfully...
Thank You for the wonderful and simple guide :good:
first of all thanks for guide
i tried to give it a try(using lineage os 14.1) and went through exact steps and when i gave command make or make - j2 then i am getting this error
Code:
Makefile:805: *** multiple target patterns. Stop.
And This is In Makefile
Code:
# Include targets which we want to
# execute if the rest of the kernel build went well.
line 805 >> vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
ifdef CONFIG_SAMPLES
$(Q)$(MAKE) $(build)=samples
endif
ifdef CONFIG_BUILD_DOCSRC
$(Q)$(MAKE) $(build)=Documentation
endif
+$(call if_changed,link-vmlinux)
Hope you will help me
Vaas_FC said:
first of all thanks for guide
i tried to give it a try(using lineage os 14.1) and went through exact steps and when i gave command make or make - j2 then i am getting this error
Code:
Makefile:805: *** multiple target patterns. Stop.
And This is In Makefile
Code:
# Include targets which we want to
# execute if the rest of the kernel build went well.
line 805 >> vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
ifdef CONFIG_SAMPLES
$(Q)$(MAKE) $(build)=samples
endif
ifdef CONFIG_BUILD_DOCSRC
$(Q)$(MAKE) $(build)=Documentation
endif
+$(call if_changed,link-vmlinux)
Hope you will help me
Click to expand...
Click to collapse
What it shows before that error.
If u run; make menuconfig and u get same error, check back the command used to configure the toolchain and make sure the path to the folder is set right.
Sent from my ONE A2005 using Tapatalk
deleted
deleted
I flashed my kernel and it boots in fastboot mode ??
used "make -j2" but got error see in pic
Brandon Indar said:
Hi all...
Happy Holidays
I have been looking around haven't found a tutorial on compiling kernel for oneplus2, so i decided on making one for those who are new to compiling kernel from source.
This tutorial will be divided into 3 parts...
>Preparing the build environment... (Ubuntu 16.04 LTS).
>Downloading source code, Toolchain and compiling.
>Testing
######################################################################
Preparing the build environment
Preparing the build environment is easy. If u haven't install Ubuntu yet, check out how to dual-boot alongside windows from here.
If u are looking for something easier like running it from a virtual machine check out this.
Right now i have Ubuntu 16.04 LTS installed which i will be using.
Once u have booted into Ubuntu, it's time to head to the terminal.
Lunch the terminal by right clicking on desktop an select "open terminal"
Once in terminal type in these commands individually (note: some commands will prompt u to type y and enter):
Code:
sudo apt-get install synaptic
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Installing repo...
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Installing Java...
Code:
sudo add-apt-repository ppa:webupd8team/java
Code:
sudo apt update; sudo apt install oracle-java8-installer
Code:
sudo apt install oracle-java8-set-default
Run this command to check if Java is installed correctly:
Code:
javac -version
If it says something like this (javac 1.8.0_111) then u are good to go.
That's it for preparing the build environment. Easy... right.:highfive:
######################################################################
Downloading source code, Toolchain and compiling
Now it's time to download the source, u will be creating a folder to download the source in so type to commands below,
Code:
mkdir oneplus2-kernel
Code:
cd oneplus2-kernel
(The folder can be found in the home directory)
If u are building for cm, download the kernel source using command below...
Code:
git clone https://github.com/CyanogenMod/android_kernel_oneplus_msm8994.git
If u are building for other rom use this one...
Code:
git clone https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994.git
Once download is completed, u need to download the toolchain which is the tool used in compiling the kernel.
It can be downloaded from here.
When download completed, move the zip file to the oneplus2-kernel folder u made earlier and then right click and select extract here.
U can now delete the zip file when extracted. So now u would have 2 folders to in ur oneplus2-kernel folder. One is the kernel and the other is the toolchain.
Time to compile the kernel... But first u need to point the variable to toolchains path. To do this, u need to go to the kernel source, folder(which is called android_kernel_oneplus_msm8994 in the oneplus2-kernel folder) right click and open in terminal, then run the command
Code:
export CROSS_COMPILE=/home/[B]"UR_USERNAME"[/B]/oneplus2-kernel/aarch64-linux-android-4.9-uber-master/bin/aarch64-linux-android-
(NOTE:Replace "UR_USERNAME" with the name u used when installing ubuntu)
Now run the commands below in the same terminal:
Code:
export ARCH=arm64
Code:
export SUBARCH=arm64
Code:
export USE_CCACHE=1
U will need to locate the defconfig file. If u are compiling for cm, the file name will be "cm_oneplus2_defconfig", and for the other source, name will be "msm8994-OnePlus2_defconfig". It is located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/configs/...
(Note: The defconfig file may vary for different roms ur building for so pay attention to that.)
So if u are compiling for cm, run the command:
Code:
make cm_oneplus2_defconfig
to add it to the config file. Change name of defconfig file accordingly as said above.
Now it's time to give ur kernel a name so run the command:
Code:
make menuconfig
This will look like when u boot into the BIOS, so use the arrow keys to navigate. This menu allows the u to choose the features of the kernel (and other options) that will be compiled. To add the name, go to "General setup" then "(-perf) Local version - append to kernel release", then type in the name for ur custom kernel and save/exit.
Finally type this command to compile...
Code:
make -j2
(Replace -j2 with the number of cpu cores)
IF (make -j2) gives errors try:
Code:
make
This will take A WHILE, so let it do it's ting.
If it compiled without errors, u will find the kernel file named "Image.gz-dtb" located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/...
:good:SUCCESS:good::victory:
If FAILED:crying: , u can post a screen-shot of ur error below and i will try an help u out.
######################################################################
Testing
Time to test ur newly built kernel, since everything went smoothly and u cant wait to boot it up.
Well download this flashable zip from here.
Open the zip file using Archive Manager without extracting.
Delete the file named "Image.gz-dtb" and replace with ur kernel located at /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/Image.gz-dtb.
That's it...Just copy the zip to ur device and flash away...
As i said early... any problem u are having with compiling, just post a screen-shot of ur error below and i will try an help u.
:good:REMEMBER TO HIT THANKS/LIKE:good:
Click to expand...
Click to collapse
I've created kernel/oneplus2 folder, git cloned in this folder and then extracted the aarch64 zip file and follow all instructions. Used "make -j2" but got error. Please see in pic. I'm trying "make", if it is going right, then ill hit thanks and reply. Thanks
also got error in "make"
Brandon Indar said:
Hi all...
Happy Holidays
I have been looking around haven't found a tutorial on compiling kernel for oneplus2, so i decided on making one for those who are new to compiling kernel from source.
This tutorial will be divided into 3 parts...
>Preparing the build environment... (Ubuntu 16.04 LTS).
>Downloading source code, Toolchain and compiling.
>Testing
######################################################################
Preparing the build environment
Preparing the build environment is easy. If u haven't install Ubuntu yet, check out how to dual-boot alongside windows from here.
If u are looking for something easier like running it from a virtual machine check out this.
Right now i have Ubuntu 16.04 LTS installed which i will be using.
Once u have booted into Ubuntu, it's time to head to the terminal.
Lunch the terminal by right clicking on desktop an select "open terminal"
Once in terminal type in these commands individually (note: some commands will prompt u to type y and enter):
Code:
sudo apt-get install synaptic
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Installing repo...
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Installing Java...
Code:
sudo add-apt-repository ppa:webupd8team/java
Code:
sudo apt update; sudo apt install oracle-java8-installer
Code:
sudo apt install oracle-java8-set-default
Run this command to check if Java is installed correctly:
Code:
javac -version
If it says something like this (javac 1.8.0_111) then u are good to go.
That's it for preparing the build environment. Easy... right.:highfive:
######################################################################
Downloading source code, Toolchain and compiling
Now it's time to download the source, u will be creating a folder to download the source in so type to commands below,
Code:
mkdir oneplus2-kernel
Code:
cd oneplus2-kernel
(The folder can be found in the home directory)
If u are building for cm, download the kernel source using command below...
Code:
git clone https://github.com/CyanogenMod/android_kernel_oneplus_msm8994.git
If u are building for other rom use this one...
Code:
git clone https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994.git
Once download is completed, u need to download the toolchain which is the tool used in compiling the kernel.
It can be downloaded from here.
When download completed, move the zip file to the oneplus2-kernel folder u made earlier and then right click and select extract here.
U can now delete the zip file when extracted. So now u would have 2 folders to in ur oneplus2-kernel folder. One is the kernel and the other is the toolchain.
Time to compile the kernel... But first u need to point the variable to toolchains path. To do this, u need to go to the kernel source, folder(which is called android_kernel_oneplus_msm8994 in the oneplus2-kernel folder) right click and open in terminal, then run the command
Code:
export CROSS_COMPILE=/home/[B]"UR_USERNAME"[/B]/oneplus2-kernel/aarch64-linux-android-4.9-uber-master/bin/aarch64-linux-android-
(NOTE:Replace "UR_USERNAME" with the name u used when installing ubuntu)
Now run the commands below in the same terminal:
Code:
export ARCH=arm64
Code:
export SUBARCH=arm64
Code:
export USE_CCACHE=1
U will need to locate the defconfig file. If u are compiling for cm, the file name will be "cm_oneplus2_defconfig", and for the other source, name will be "msm8994-OnePlus2_defconfig". It is located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/configs/...
(Note: The defconfig file may vary for different roms ur building for so pay attention to that.)
So if u are compiling for cm, run the command:
Code:
make cm_oneplus2_defconfig
to add it to the config file. Change name of defconfig file accordingly as said above.
Now it's time to give ur kernel a name so run the command:
Code:
make menuconfig
This will look like when u boot into the BIOS, so use the arrow keys to navigate. This menu allows the u to choose the features of the kernel (and other options) that will be compiled. To add the name, go to "General setup" then "(-perf) Local version - append to kernel release", then type in the name for ur custom kernel and save/exit.
Finally type this command to compile...
Code:
make -j2
(Replace -j2 with the number of cpu cores)
IF (make -j2) gives errors try:
Code:
make
This will take A WHILE, so let it do it's ting.
If it compiled without errors, u will find the kernel file named "Image.gz-dtb" located in /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/...
:good:SUCCESS:good::victory:
If FAILED:crying: , u can post a screen-shot of ur error below and i will try an help u out.
######################################################################
Testing
Time to test ur newly built kernel, since everything went smoothly and u cant wait to boot it up.
Well download this flashable zip from here.
Open the zip file using Archive Manager without extracting.
Delete the file named "Image.gz-dtb" and replace with ur kernel located at /home/"UR_USERNAME"/oneplus2-kernel/android_kernel_oneplus_msm8994/arch/arm64/boot/Image.gz-dtb.
That's it...Just copy the zip to ur device and flash away...
As i said early... any problem u are having with compiling, just post a screen-shot of ur error below and i will try an help u.
:good:REMEMBER TO HIT THANKS/LIKE:good:
Click to expand...
Click to collapse
I've told that I've got error in "make -j2" and so i tried the "make" and got error again. Please see in this pic.

Categories

Resources