Related
[Guide] Compiling your own nightly kernels Quark/Blechd0se & Essential Git commands
Well Hello again another day, another do it yourself guide for the people like me with ORD
Search it up to see what am on about
Today there will be two guides they are very easy I promise - One on how to compile just the kernel image(zImage) and the other on how to use some common git commands.
Kernel Guide
1. Downloading the sources & packages needed :
Before we start we need to make sure you have the necessary packages required for you to compile the kernel.
If you already have an android build environment setup then we are good to go
If not then you can either use my guide and get an android build setup going just incase you want to compile your own nightly later on or you can just download the necessary packages required for compiling the kernel.
Packages needed - git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib.
So for ubuntu based system it will be -
$ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
For arch linux -
$ sudo yaourt git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Most of the packages are found in the AUR repository so you need a frontend to AUR like yaourt.
Once you have the packages installed we are going to clone the kernel tree into our computer.
I feel it's best you make a new directory for which you will use to compile kernels.
Once you are in your directory of choice we can now download the kernel sources
For Quarx kernel - $ git clone https://github.com/Quarx2k/jordan-kernel
For Blechd0se kernel - $ git clone https://github.com/Blechd0se/jordan-kernel
One thing to note is after the git clone command you can name the folder in which the sources will be saved to.
For example git clone https://github.com/Blechd0se/jordan-kernel blechd0se. This will renamed the folder to Blechd0se which the kernel sources will be saved to instead of the default name of jordan-kernel.
2. Downloading the toolchain/s
If you have one of the rom sources (CM10, SB, CNA) synced up then you can just point the cross compile to that directory.
$ git clone https://github.com/Quarx2k/platform_prebuilt
Here you have a choice of two toolchains either the default google one (4.4.3) or the recently added linaro toolchain(4.5.4) by Quarx
3. Setting up configuration
Now cd into the kernel folder so for me -
$ cd ~/Kernel/Blech0se
Then run the follwing commands -
$ export ARCH=arm
$ export CROSS_COMPILE=~/<location of toolchain>
- For the linaro toolchain it will be export CROSS_COMPILE=~/Kernel/arm-eabi-4.5.4-linaro/bin/arm-eabi-
- For google's iw will be export CROSS_COMPILE=~/Kernel/arm-eabi-4.4.3/bin/arm-eabi-
make mapphone_defconfig
If you are compiling Blechd0se kernel then you can choose what process schedulers you want BFS or CFS the default is CFS.
To enable BFQ you need to do the following things
make menuconfig this will bring up a menu which you can use to customise the kernel if you know what you are doing this can also be used on Quarx's the difference is you don't have as much choice as in Blechd0se's.
Scroll down and select enable block layer then IO schedulers the scroll down to BFS and type "Y" a star will appear in the checkbox showing it will use BFS now.
Once that's done you can compile own kernel image using the make command
make -jx <maximum number of jobs>
Replace the x with the amount of jobs you want. I usually use -j8 but you can use higher but it can slow down you PC.
Read this post for more info on effectively using make -jx
You kernel will be finished into a couple of minutes to hours depending on the amount of jobs you used and how many cores you have in your processor.
Now we need to package the kernel into a zip to flash recovery.
I recommend you download one of Blechd0se's zips and modify it.
You need to delete the config folder if you don't want your overclock settings getting overwritten and also you can modify the updater script found in META-INF/com/google/android.
Then replace the zImage in the folder system/2ndboot/ with your new one.
You can find your zImage into the arch/arm/boot folder in your kernel source folder.
4. Updating and rebuilding -
To update your sources with the latest changes you can use the git pull origin command from the kernel source folder.
So for me it will be -
$ cd ~/Kernel/Blechd0se
$ git pull origin
Once it's being updated we need to first use
$ make clean
$ export ARCH=arm
$ export CROSS_COMPILE=~/<location of toolchain>
$ make mapphone_defconfig
$ make -j8
Credits & Thanks-
To XDA as always for being an awesome resource and playground
To Google for all they awesomeness
To Blechd0se for being an awesome kernel dev
To Quarx for his amazing work on the kernel so far
To thewadegeek for his guide which I have adapted this from Thank him here
Git Commands
The following git commands are the essential ones are feel that are needed to be able to use git effectively allowing you to help contribute back to the community...... With these commands you can help with things such as rom translation, bug fixes etc......
Commands -
1. git clone
This is used to clone a remote repository like here onto your local drive allowing you to edit/add files.
e.g
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common
This will clone the repository android_device_moto_jordan-common into a new folder called android_device_moto_jordan-common but if you want the folder to be called something else just add the name after the url like so....
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common Defy-common
Additionally, you can also specify downloading one branch by using the -b command you can also still has a custom name for the folder by putting the name at the end of the branch name. E.g
$ git clone https://github.com/Quarx2k/android_device_moto_jordan-common -b jb_2ndboot Defy-common
2. git
HAHA again
Last one for a party
I just finished syncing CM10 sources, I'll do this one too now
Thanks, you rock!
mark,thanks
Sent from my MB526 using xda premium
Thank you Kayant for this nice guide Hope to see some additional dev's soon
Maybe you can add how to push a commit
And if you only want to rebuild modified modules you can simply run the "mmm" command, safes time
Btw: BFQ and CFQ are I/O-Scheulders, CFS and BFS are process schedulers
When I used to have defy (good old days) this was something I want to share with everyone but I couldn't because I lost my defy when I have doing some progress in custom kernel. Then I lost track of this great community and stop to make things for defy. It's great to see this kind of tutorials for help other users as well. As always, very thanks kayant!!!
Enviado desde mi MT27i usando Tapatalk 2
Thought I might add. on that make -jx command, x should be your max threads + 1 -- eg, I have a quad core w\o hyper threading so I use 5.
use the "nproc" command to find out how many threads you have
the make jx is different than sync jx, where sync jx is how many files you'll concurrently download. I figure most of us know that, but I figured I'd make the distinction.
number of cores + 1 is recommended on a lot of faqs; your results may vary, but using j5 (my recommend setting) versus not setting it (j4 by default, i think -- needs fact checking) speeds up compile time by 20-30 minutes (Quarx CM 10). using too many threads will slow you down and using too little is inefficient and thus slower.
Thank you very much for your informative guides Kayant always learn something from it and really appreciate it:thumbup:
Sent from my MB526 using xda premium
skeevy420 said:
Thought I might add. on that make -jx command, x should be your max threads + 1 -- eg, I have a quad core w\o hyper threading so I use 5.
use the "nproc" command to find out how many threads you have
the make jx is different than sync jx, where sync jx is how many files you'll concurrently download. I figure most of us know that, but I figured I'd make the distinction.
number of cores + 1 is recommended on a lot of faqs; your results may vary, but using j5 (my recommend setting) versus not setting it (j4 by default, i think -- needs fact checking) speeds up compile time by 20-30 minutes (Quarx CM 10). using too many threads will slow you down and using too little is inefficient and thus slower.
Click to expand...
Click to collapse
Thanks for the infromative post as always
In this situation I feel it doesn't matter too much since it takes minutes to compile just the kernel even on my core 2 duo but I will add your hint your post to the OP. Thanks again ^_^
Kayant said:
Thanks for the infromative post as always
In this situation I feel it doesn't matter too much since it takes minutes to compile just the kernel even on my core 2 duo but I will add your hint your post to the OP. Thanks again ^_^
Click to expand...
Click to collapse
You're completely right about the kernel and time -- but for full rom builds and a Funtoo "emerge -uDNav world" it helps. I just saw that j8 and thought "My dual core Athlon 64 would hate me if I did that".
Great guide as always
That does it.
I'm studying Linux in earnest. Enough of this dabbling around the edges... :cyclops:
renoob said:
That does it.
I'm studying Linux in earnest. Enough of this dabbling around the edges... :cyclops:
Click to expand...
Click to collapse
That's the best thing I ever did. I hated XP, wish it was more like Win2k -- I'd gladly pay for Win8 if it had a 2kPro interface. Win2k was awesome, and the only Windows OS I'll give praise to.
I recommend starting out with Ubuntu or Mint (Mint based on Ubuntu, not Debian). There's better support for Ubuntu and distros based on Ubuntu. After about 4-6 months, once you start learning apt, the command line (bash), and some Linux basics; switch to Pure Debian or Mint Debian -- much better than Ubuntu, but not as user friendly (or AptoSid\Sidux -- they're based on Debian Unstable (Sid) -- which is actually pretty stable, ya just gotta be able to fix it if it breaks). I've found that the easiest way to learn it is to just do it. Reading up on it only goes so far without putting it to practice.
After a year or so, try out Gentoo\Funtoo and you'll learn a lot about Linux -- but those distros are not for the faint hearted and require time and dedication to get a GOOD working environment. Once you have it how you like it, it WILL be the fastest desktop you can use with the fastest compile time -- well, WILL should be shall or can. I'm about to turn my old compile PC into a generic x64 Funtoo box (one of my 64's is AMD, the other Intel). A generic build will allow me to use the same base system on both PC's and allow me to rebuild them to they're specific architecture after its all set up. It took me 3 tries to get a good Gentoo box running -- miss one step in that install guide and you can be up that creek.
11 years on Linux now, 9 years with only maybe 25 boots into Windows -- past 10-15 were to flash an sbf and to reboot back to Linux -- so glad I stumbled across the sbf_flash Linux tool. Last time I booted Windows was after installing Win7 and its drivers....seriously, all I've done is installed it and the drivers and haven't booted it up since. I've used Red Had, Fedora, Ubuntu, Arch, Mint, Debian, Suse, Mandrake, Gentoo, Funtoo, Sabiyon, Aptosid, Sidux -- after using all of them, I find that I prefer Debian\based systems (not Ubuntu\based systems -- I actually don't like Ubuntu, well, since 0910 -- it was a good distro up until then imho). And I like Funtoo for the source based distros -- I've messed around with other source based ones (Sorcerer, Arch) and like Futnoo over Gentoo and the rest in the end.
//You might already know enough Linux, I'm just posting what I think is the easiest way to start using and, therefore, leaning Linux.
///I'm also surprised that there isn't an XDA based Linux distro -- designed by XDA members to make it easier to get into Linux\rom hacking
rom compiling with all the tools we all need an apt-get away.
EDIT
I've been meaning to ask, Do any of you programmers have any good books to recommend? I'm finding myself of the border of power user and programmer and need to start learning some code skills to cross over. I'd like to learn something C, Python3, and Java; but there are a ton of books on them and I'd like a recommendation from someone HERE who knows a bit of programming and what they'd use to learn nowadays. I'm sure I'm not the only one with that question either. Something C and Java for Android, Python3 for Linux (maybe Android if that project has gained some ground). Thanks.
/Bolded that so it sticks out.
@skeevy
I use Arch Linux ATM and a love it but yh I have read about gentoo and how you can build it to your system.... Once I get a new PC in the near future hopefully very soon am going to try that and freebsd... Thanks for the advice
Let's Go ^_^
Kayant said:
@skeevy
I use Arch Linux ATM and a love it but yh I have read about gentoo and how you can build it to your system.... Once I get a new PC in the near future hopefully very soon am going to try that and freebsd... Thanks for the advice
Let's Go ^_^
Click to expand...
Click to collapse
Never tried BSD. Arch was OK, but I started on Debian, jumped around different ones for a few years, stuck with Ubuntu 7.10 for 6 months, hated their update, and been on Debian or Mint Debian ever since; testing or Sid usually -- I transcode my DVD's and stable has older codecs . Arch was a year ago for a month -- if I gave it more of a chance I'd probably like it as much as I do Debian. I've used almost all major distros, desktop environments, window managers, etc; but I always find myself back with Debian\XFCE -- it just works for me.
If you didn't know, Debian has a freeBSD based distro as well. That'll make it easy to try out BSD in an Debian style environment.
Hoped I could say the same. School is a real Linux killer.
Even for software that has a linux port, they only give us the installer/license for the Windows version. :/
PLC and robotics software tend to only run on Windows anyhow. As 3D drawing.
Always have the need to change my partition setup Linux-Windows after installing such an application on my laptop.
I am now using Ubuntu for 3 years. I like the look and don't want to spend time on my PC installation so it's good for me . I can imagine that it's different if you really want to get to know Linux or Unix.
What I hear most for learning to program (me not so much) is just try to do what you plan to do with it(an android application, ...) and searching how to get there. Don't know many that read books. Except for guidelines for memory management and security for example later on.
I've been programming for nearly 20 years. Only had a few classes in the basics. The rest has been trial by fire. Use Google a lot to figure out how to do stuff, but I can't really TALK about code as I don't know what to call some of the things I do. I highly recommend taking formal classes and reading books.
Sent from my SPH-L900 using xda premium
I compiled my own kernels on my phone and it's running
ps:My english is not so good:crying:
labsin said:
Hoped I could say the same. School is a real Linux killer.
Even for software that has a linux port, they only give us the installer/license for the Windows version. :/
PLC and robotics software tend to only run on Windows anyhow. As 3D drawing.
Always have the need to change my partition setup Linux-Windows after installing such an application on my laptop.
I am now using Ubuntu for 3 years. I like the look and don't want to spend time on my PC installation so it's good for me . I can imagine that it's different if you really want to get to know Linux or Unix.
What I hear most for learning to program (me not so much) is just try to do what you plan to do with it(an android application, ...) and searching how to get there. Don't know many that read books. Except for guidelines for memory management and security for example later on.
Click to expand...
Click to collapse
That's what I've been doing up until now, but Google only helps so much -- I can do a search on learning Java and come up with 1000's of faqs, guides, ect -- weather its worth reading or full of it is unknown too me since. A good book can be worth its weight in gold. With a bad internet faq, ya might as well change the faq's a to a u and bend over, cause that's what you're doing to yourself by learning from bad sources.
While I don't know what apps you're using, I know that some apps have a license isn't limited to the platform -- the Win License works on Linux\Mac\Unix as well. Or just use the Lin version and not feel guilty since you have the Win license .
Ubuntu was great until it started getting too bloated for my tastes -- and they're XFCE editions usually use much more resources than doing the same thing with Pure Debian installed from the command line up. On compile\dev boxes you want as little running as possible for obvious reasons. Not to mention the UI can greatly change from release to release with Ubuntu. Buntu was my 2nd Linux to run; Debian first -- Learned more on Ubuntu then went back to Debian. Pure Debian can be daunting if its your first distro.
Malcont3nt said:
I've been programming for nearly 20 years. Only had a few classes in the basics. The rest has been trial by fire. Use Google a lot to figure out how to do stuff, but I can't really TALK about code as I don't know what to call some of the things I do. I highly recommend taking formal classes and reading books.
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
Thanks. I'd be taking classes if I could. I don't qualify for any grants and I don't want to go for a loan because of the uncertainty of being able to pay it off.
Something I'm seriously thinking about doing is this -- free online classes from MIT. That has to be good information.
@All
I'm thinking of starting a generic x64 Funtoo box and get it to where XFCE is working, Nvidia graphics (all I buy is Nvidia Cards ), Android SDK is up and running, and all the required scripts, apps, udev rules, etc are already installed set up (repo, sbf_flash, apktool, etc). Then upload that as a zip so all you'd have to do is extract the zip to a blank partition, edit its fstab, update grub, set the build environment variables to your own, reboot, set users\passwords, and recompile the system.
I'm already going to do all of that except for the upload as a zip part -- I have 2 64 bit pc's -- one amd, one intel -- so I have to build it as a generic 64 in order to use the same system on both boxes. I was just wondering if anyone else would be interested in something like that once its all done.
---------- Post added at 09:22 AM ---------- Previous post was at 08:25 AM ----------
I normally don't post my PM's, but the last half on this one I sent out might be useful to some of you looking for the essential git commands
I have a couple of good sites I use for github reference. Here & here
Typing "man git" in the command line has helped me a lot as well. I've learned most of my Linux knowledge by typing "man name_of_program" and Googling what it said that I didn't fully understand -- especially with video encoding, ffmpeg and mplayer are some long reads, so is git. Git also has a "git help name_of_git_command" program that's helpful as well.
There's also a few threads on the Defy forums dedicated to helping out people trying to do exactly what you're wanting to do. The nightly builds link is a really good place to start with -- contains pretty much all you need to know to be able to compile roms. Kayant's an awesome dude and really helpful. His threads are great for users wanting to learn and\or contribute back.
[Guide] Compile your own nightly builds - AOKP, CM10, CM9, CNA, Slim Bean, P.A.C
[Guide] Compiling your own nightly kernels Quark/Blechd0se & Essential Git commands
I learned git from forums like the ones above, those reference sites and man pages\help program. Took about a week of trial and error before I got the hang of it. I still have a hard time remembering to start a branch before editing crap after the initial sync .
Honestly, the hardest thing to do, in regards to PA, is adding in FM. Almost everything else Defy\Bravo related just cherry picks right in with no\ very little and easy to fix conflicts. The FM commits are old and those files have changed a lot from when Quarx & Maniac did the patches -- especially between Quarx's and PA's current.
Cherry picking is pretty easy, navigate to the base directory -- like frameworks/base -- then its "git cherry-pick a_ton_of_hex" and it'll either pick right in or you have conflicts. If I get conflicts, I use the app "git-cola" ran from command line in the /frameworks/base directory; and its a gui app that'll list what files have conflicts (and a lot more) -- I then open up the conflicting file with tkdiff (or whatever diff you like) and fix the conflicts, "git commit -a" (saves changes), and push to github. If you don't get conflicts, just commit and push. Btw, the ton of hex is all the hex code next to the commit on github.com, review.cyanogen-mod.com.
Making changes on your own is done simply be navigaitng to the base directory -- frameworks/base for the android_frameworks_base repo, device/moto/mb520 for the Bravo repo -- and opening a terminal, starting or pointing to a branch (git checkout -b name_of_new_branch is a good command to run before you do anything -- checkout -b n_o_b creates a new branch and places you on it), then do what ever changes you need to do, then do "git commit -a", enter a description, and push. Once you have different brances going, you can use "git checkout name_of_branch" to switch between them. Read up on branching, cause theres a lot to it.
There's a lot of different ways to do git, and my way might not work for you.
Good luck and have fun reading -- you'll be doing a lot of it :silly:
This is DIY
If you are just looking for a well done and stable PA download, you are probably the wrong place. Then go and grab xzzz9097s build, it's good!
If you are impatient and know what to do, just leave and do the init/sync/build.
For anyone wanting to build her/his own PA without any "extras", go ahead and read on.
We already have a very easy full guide to compile CM10 for HOX. I was looking for the same for ParanoidAndroid, but did not find a 100% guide, meaning I had to do it myself.
To be fair, I only needed to do 1% as you will see after the usual disclaimer. I hope this little guide will be enough to make anyone complile their own PA for the HOX.
The usual disclaimer:
I am no developer!
I just happen to be able to read and understand instructions. I am persistent and know how to search for answers.
With luck and patience I ended up with a 184MB zip, that installs and runs just fine on my HOX.
I pass this guide as it is now, no guarantee no returns. I will probably not be able to help much here, time is very limited, so no commitments for support from me.
If it breaks you device, you broke it all by yourself
I am no developer!
gokussjx made the general guide, explaining how to port Paranoid Android 3.xx to different devices.
It works 99% for Endeavoru. The last 1% takes some effort to get right.
For me, not knowing what I am doing, it took a lot of trial and error, but eventually, - I made it and might as well pass it on here.
I'm in debt to all the people helping out in that thread. Huge thanks!
To get started, just follow a few simple steps:
You need a linux setup.
Install as your main system or run it in windows with VirtualBox.
Most guides are expecting Ubuntu. I use Mint Debian 64, which is just perfect for this job (and everything else ).
For VirtualBox you need at least a 50GB virtual-drive. Add 16GB if you will use ccache. I have build PA with a 52GB VBox in Win7.
It was just enough to compile, but had no room for ccache!
Compile time (VBox) on EliteBook 8540w (i7) was 120min. Not too bad, considering my old DeskTop need close to 4 hours on pure Linux.
Expect to download 8GB of source. Add 18GB for building to the "out" folder.
Enough statistics now, let's get started.
Follow gokussjx guide to setup linux for PA compiling.
Follow only these steps:
# Install OpenSSL, for Python
# Install Dependencies
# Configure USB
# JAVA JDK Installation
# Python Installation (just pick option 1)
# Android SDK
Click to expand...
Click to collapse
Exit gokussjx guide and continue here:
Download your favorite arm toolchain:
I found mine here.
Just extract the archive to any folder with user access, later you will point the build system to the /bin folder of the toolchain.
Install CCACHE:
Code:
$ sudo apt-get install ccache
Activate it in .bashrc:
Code:
# use ccache
export USE_CCACHE=1
You can change max-cache size, 16G should be enough for this build.
From terminal:
Code:
$ ccache -M 16G
Install Repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Download the build manifest:
Code:
$ mkdir -p padroid/system
$ cd padroid/system
$ repo init -u git://github.com/teemodk/manifest.git -b padroid
Get the source!
Code:
$ repo sync -j16
Find this section in "build/envsetup.sh" update with your favorite arm toolchain:
Code:
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=[B]~/toolchain/linaro4.8/bin[/B]
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
Go!
Code:
$ ./rom-build.sh endeavoru
Thats all. If it went well, get your new ROM in "out/target/product/endeavoru"
Don't forget the gApps.
Credits go to
PA:molesarecoming, D4rKn3sSyS for the awesome hybrid magic. All PA contributors. gokussjx for the mother of all PA guides. All the helpful people here, that use their time to help.
CM(aosp):thöemy,gorbi16,tbalden,(pabx) and all the unknown soldiers contributing to CM
Everyone I forgot.
Differencies from the official guide.
The official PA manifest is put together in a way, so you can easily build and maintain multiple devices with only one manifest.
It works by adding and removing device specific code with local manifests under the "vendor/pa" folder.
However, I am only compiling for OneX, so I found it easier to add/remove stuff directly in the main manifest.
The downside to this is, that you have to manually maintain the manifest everytime you want to sync with PA. Place for improvement
All changes in STEP 2 of the official guide, is already done if using my guide with padroid manifest.
In vendor/pa these steps are done:
Code:
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.adds"]/manifest/<device>.adds[][/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.removes"]/manifest/<device>.removes[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/prebuilt/pa_endeavoru.conf"]/prebuilt/pa_<device>.conf[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/pa_endeavoru.mk"]/products/pa_<device>.mk[/URL]
* Add device makefile entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/AndroidProducts.mk"]/products/AndroidProducts.mk[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/tree/padroid/vendorprops"]/vendorprops/<device>.proprietaries[/URL]
* Add device lunch menu entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/vendorsetup.sh"]/vendorsetup.sh[/URL]
Furthermore, I temporarily moved the CM adds/removes from "vendor/pa/manifests" to .repo/manifest.xml.
I am sure there are better ways to handle git/repo/manifest etc., but this works well for me for now. Open for suggestions though.
Problem Solving
If (when) you run into problems, go to the official guide and find the answer. Most, if not all, errors is already answered there. If not, ask.
But first make a serious effort to find the error yourself. Read some good advice about finding the error.
As a rule of thumb: The build system tells you where to find the error! Something is missing, something is duplicated or somthing is just wrong. It's all in the log, running up your screen when compiling.
Build 25.Oct.2013
http://d-h.st/XRt
Nice, I'm always eager to learn this stuff .
Thanks!
ROM uploaded to post 3.
teemo said:
ROM uploaded to post 3.
Click to expand...
Click to collapse
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Mat08.cc said:
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Click to expand...
Click to collapse
The ROM is as close to stock as it get for OneX. It is really a mix of CyanogenMod and ParanoidAndroid. I follow the official build guide from PA-team.
The kernel is from same source as CM.
You can see everything in the manifest.
@teemo
your build is running fast and stable, congratulations! maybe you can keep updating this .. I appreciate it and I'm sure many other people would be of the same opinion
Sry,wrong threat....
Gesendet von meinem EndeavorU mit Tapatalk
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Mat08.cc said:
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Click to expand...
Click to collapse
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
teemo said:
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
Click to expand...
Click to collapse
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Mat08.cc said:
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Click to expand...
Click to collapse
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
One-X-master said:
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
Click to expand...
Click to collapse
Yeah I thought so! But I would love to learn! I have always looked to devs as to extraordinary people, understanding what makes them such would be great
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
LuisDias said:
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
Click to expand...
Click to collapse
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
bosas200 said:
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
Click to expand...
Click to collapse
Thanks brotha
teemo said:
Build 25.Oct.2013
http://d-h.st/XRt
Click to expand...
Click to collapse
Any chance helping me build AOSB with newer cm 11 base?
As no instructions anywhere on building AOSB from source. Source is
https://github.com/AOSB?page=1
Many thanks
Apologize for possible OT, but I can't find an always working (and stable) SSH daemon app for the Zenfone2's Lollipop
This is what I tried, any of them PAID apps:
QuickSSHd - too old, not even starts
SSHDroid Pro - sometime starts, only first time after reboot, but only without root and higher ports (>1024)
RRooted SSH/SFTP Daemon - always refusing connections
Ssh Server Pro (olive tree) - seems promising, but very poor of binaries
The Dropbear service hanging issue seems the root of this problem
Thanks for any hint
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Blades said:
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Click to expand...
Click to collapse
Hi,
I followed the following guide which you can get from googling "Compiling-Dropbear-for-a-Nexus-7-tablet". Sorry, I can't post any links yet as my post counts are still below 10
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Cheers.
wolfdude said:
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Click to expand...
Click to collapse
Thanks for your answer.
Sorry but I can't get the exact entry-point, bypassing all the NDK / X-compiling stuff, as we're on a x86_64 architecture
Referring to the "simplified" version of your link (here: https://nerdoftheherd.com/articles/cross-compiling-dropbear-rsync-android/ ),
how should I compile the Dropbear source ?
Something like this ?
Code:
./configure \
--disable-zlib --disable-largefile --disable-loginfunc --disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog \
CFLAGS='-Os -W -Wall -fPIE' LDFLAGS='[COLOR="Red"]-static[/COLOR] -fPIE -pie'
... right before make-ing ?
Thanks for any further hint in the right direction
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
From that site, what I did was :-
1) Download dropbear v58 (dropbear-2013.58.tar.bz2). I know this is older but the patch available is based on this version.
2) Download patch (dropbear-patch2) from that site.
3) Apply patch to the original dropbear (v58) source.
4) Run configure :-
./configure --disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog
5) Run make :-
STATIC=1 MULTI=1 SCPPROGRESS=0 PROGRAMS="dropbear dropbearkey scp dbclient" make strip
6) You should end up with "dropbearmulti" which is a static binary that you can then copy over the the phone & go on from there.
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
wolfdude said:
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
[...]
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
Click to expand...
Click to collapse
Yes of course. The main link you weren't able to post is:
http://blog.xulforum.org/index.php?post/2013/12/19/Compiling-Dropbear-for-a-Nexus-7-tablet
Actually that procedure seemed too complex as mostly dealing with the cross-compiling issue, which didn't apply to x86 case.
So I named the derivative one
Thanks for pointing out the static compiling is done within MAKE and not CONFIGURE phase... I'm quite newbie in those flags so I do appreciate any of your words
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Val3r10 said:
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Click to expand...
Click to collapse
Hi,
Yes, the patch for v58 does not work for v67. I think one just have to go through the patch and "adjust" it slightly for the newer v67. Hopefully there isn't much changes from v58 to v67. There may be more than just commenting out the password prompt as there are certain functions that don't work in Android as in *NIX. When I have some time, I will attempt to patch v67 meanwhile, I'm running v58 fine on my ZE550ML so no complains there.
Cheers.
Hi,
I've created a guide on compiling the latest dropbear (2015.67) :-
http://forum.xda-developers.com/zenfone2/general/compiling-dropbear-2015-67-zenfone-2-t3142222
Hope it helps.
Cheers.
wolfdude said:
I've created a guide on compiling the latest dropbear (2015.67)
Click to expand...
Click to collapse
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Val3r10 said:
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Click to expand...
Click to collapse
Of course. I've managed to compile tcpdump, iperf, gdbserver, etc... successfully and working fine on the Zenfone 2.
Cheers.
I found that "Servers Ultimate" SSH/SFTP modules work on the Zenfone2 once properly configured. Its not working 100% but its already more then most solutions out there.
As the title says. This board is created for questions and answers pertaining to getting new ROM's and ports for our P9000.
THIS IS NOT A BUG REPORT DISCUSSION.
New Development only.
If you would like to see a new ROM for the P9000? Build it, and share it. Check out some of the guides, then ask some questions on building it.
I will be staying with Mediatek devices for the long term and encourage more people like me to start bringing some development love to them.
Thank you
Some useful guides.
https://www.youtube.com/watch?v=aF--LQDgg1M
http://source.android.com/source/initializing.html
Any guides to add? I'll be glad to add them.
Credits:
@Deepflex (Active) Vendor, Device, Kernel sources
@Jonny (Active) TWRP and multiple additions to Kernel source
@skeleton1911 (Active) Stock based ROM's
@leskal (ACTIVE) device and kernel commits
Please let me know of any credits I'm missing.
Have been working on CandyRom6. Been getting a lunch error in line 234. Not quite sure how to get lunch to point to the correct mk file. candy/device/elephone/p9000/candy.mk. Any suggestions?
syncing AOKP MM. I enjoyed this rom in my samsung days.
something interesting to try for automating builds.
http://forum.xda-developers.com/chef-central/android/guide-tool-projekt-scribt-v1-33-t3503018
electrofryed said:
Have been working on CandyRom6. Been getting a lunch error in line 234. Not quite sure how to get lunch to point to the correct mk file. candy/device/elephone/p9000/candy.mk. Any suggestions?
Click to expand...
Click to collapse
Check the .mk files in the root of your device tree, I'm guessing you need to rename a reference in one of them from something like 'cm.mk' to 'candy.mk'
So far I've modified /AndroidProducts.mk cm.mk vendorsetup.sh I think I'm missing a file to modify. Just not sure which one. Unfortunately, since I didn't make a copy of the original Candy directory, I'll need to resync to get rid of my Troubleshooting changes. Good lesson. After each sync, make sure you make a backup of the original in case you forget the modifications you've made. Lol
I think I figured it out. My product name didn't match the vendorsetup.sh
Update: Nope. That didn't work. I've attached a screenshot of the changes I've made in case anyone wants to chime in.
Thank you
What lunch command are you using?
Jonny said:
What lunch command are you using?
Click to expand...
Click to collapse
I just used lunch to check the build. I used brunch for AOKP and it seems to be working at the moment. I'm going to re sync candy and start from scratch next weekend. I noticed when using lunch in AOKP, it used my git which wasn't setup when building candy.
electrofryed said:
I just used lunch to check the build. I used brunch for AOKP and it seems to be working at the moment. I'm going to re sync candy and start from scratch next weekend. I noticed when using lunch in AOKP, it used my git which wasn't setup when building candy.
Click to expand...
Click to collapse
I recomend the brunch command as on official build guide of cm
Yeah. I tried brunch and "rainbowfarts" (recommended by AOKP. Lol. It stops when calling for maven 1.6 (I'm on 2.10). I think I need to find the file that will link my builds to my build environment path.
leskal said:
I recomend the brunch command as on official build guide of cm
Click to expand...
Click to collapse
BTW. Glad to see you here. I've seen your work on git and wanted to credit you.
electrofryed said:
BTW. Glad to see you here. I've seen your work on git and wanted to credit you.
Click to expand...
Click to collapse
Nice, also check this guide: https://wiki.cyanogenmod.org/w/Build_for_huashan#Install_the_Build_Packages
Maybe you will fix the prob with the "brunch" command
leskal said:
Nice, also check this guide: https://wiki.cyanogenmod.org/w/Build_for_huashan#Install_the_Build_Packages
Maybe you will fix the prob with the "brunch" command
Click to expand...
Click to collapse
Great guide!! I see a few big differences between this guide and some of the others. The biggest is the method of getting java 7 for 16.04. I've been using Oracle and open Java 8 the whole time.
Update. I got past the initial halts in the AOKP build. When it finishes, I will be testing. (in the morning EST)
Update: spoke too soon. Kernel compiling issues. Another hurdle. Ugh
Hello,
i started my first build-experience with downloading the cm13 sources and the p9000 sources form deepflex. Since yesterday i have an successful build cm_p9000-ota.zip package but after installation it ends in an bootloop!! I have no idea where to start searching for the mistake... I get no error massage while installing it.
Could someone give me a hint?
electrofryed said:
Update. I got past the initial halts in the AOKP build. When it finishes, I will be testing. (in the morning EST)
Update: spoke too soon. Kernel compiling issues. Another hurdle. Ugh
Click to expand...
Click to collapse
You need to fix includes when building out of mtk build chain, or use other sources that already have this done
OK, i get it running!
But, is their a reason why "/android_device_elephone_p9000/mediatek_driver_nl80211.h" is missing in the repo? Sorry, but i am totally new and trying to understand how these builds work and what exactly is needed to build a bugles ROM.
Following this thread, I recently built e/OS 0.22q for Motorola One xt1941-4 (deen). Please refer to https://e.foundation/e-os/ to learn more about e/OS.
After several weeks of usage this ROM seems to be very useful. Find the zip file with the images of the Andoid 10 version here. Unzip and flash using adb and fastboot. Please use at your own risk!
I used the following repos in my local manifest:
https://github.com/electimon/device_motorola_deen, branch Lineage-17.1
https://github.com/electimon/vendor_motorola_deen, branch Lineage-17.1
https://github.com/100Daisy/android_kernel_motorola_deen, branch android-10-release-qpks30.54-22-13
In addition, I included
https://github.com/LineageOS/android_system_qcom, branch Lineage-17.1
which is obviously needed by some stuff from vendor. Vendor files are from 2019, so if someone could provide a more recent repo, I would be glad to know (last stock rom provided by Motorola is from October 2021)
All credits go to the creators of the LineageOS 17.1 port (link to thread at the top of this post)! Very good job guys!
Works just fine, thanks.
LSV12 said:
Works just fine, thanks.
Click to expand...
Click to collapse
Thanks!
Hi! can you make a tutorial to install this rom? i'm new at the custom roms and idk how to install, and sorry for my bad english, i'm brazillian
01nick07 said:
Hi! can you make a tutorial to install this rom? i'm new at the custom roms and idk how to install, and sorry for my bad english, i'm brazillian
Click to expand...
Click to collapse
I'm sorry, but I have no time and I am not good at making tutorials at all. Please refer to the thread referenced at the beginning of the initial post. There you should find all necessary information. If this is not enough, do some more searching and reading on XDA. If you still feel uncomfortable, stay with the stock rom.
Nice work. You succeeded where I failed
I'm trying to build on top of Q to build a e/os 0.23-R version (I see you actually managed to do this). Are you willing to share your sources (here/github) or just a hint on how to build it?
I tried to compile, but I'm stopped at the beginning of the repo-sync for a duplicate manifest.xml
Thank you.
PS: One thing I stumbled upon and managed to fix is the new way e/os manages the prebuilt apk with git lfs
The build will fail unless these apks are downloaded in a separate step. Here's the relevant info from the docs:
Those building using traditional repo sync method refer android_prebuilts_prebuiltapks_lfs 3
You will have to install git-lfs
sudo apt-get install git-lfs
After completing a repo sync, you will have to run
repo forall -c 'git lfs pull'
xdadevc said:
Nice work. You succeeded where I failed
I'm trying to build on top of Q to build a e/os 0.23-R version (I see you actually managed to do this). Are you willing to share your sources (here/github) or just a hint on how to build it?
I tried to compile, but I'm stopped at the beginning of the repo-sync for a duplicate manifest.xml
Thank you.
PS: One thing I stumbled upon and managed to fix is the new way e/os manages the prebuilt apk with git lfs
The build will fail unless these apks are downloaded in a separate step. Here's the relevant info from the docs:
Those building using traditional repo sync method refer android_prebuilts_prebuiltapks_lfs 3
You will have to install git-lfs
sudo apt-get install git-lfs
After completing a repo sync, you will have to run
repo forall -c 'git lfs pull'
Click to expand...
Click to collapse
Thanks! I wrote a report on the endeavour, where you will find almost everything of what I know.
Motorola One (xt1941-4) „deen“: How to build e/OS 0.22 – Herr Elling
fusselbart.de
Please note that I am not a ROM programmer, nor maintainer, and most of the build process is black box to me. However, I will try to build e/os 1.x after summer...
HerrElling said:
Thanks! I wrote a report on the endeavour, where you will find almost everything of what I know.
Motorola One (xt1941-4) „deen“: How to build e/OS 0.22 – Herr Elling
fusselbart.de
Please note that I am not a ROM programmer, nor maintainer, and most of the build process is black box to me. However, I will try to build e/os 1.x after summer...
Click to expand...
Click to collapse
I read your article and managed to follow it and compile my own e/os. I'm also not an android developer. I did some kernel work in the early days, around Android 2.0 but my path diverged and now I'm completely lost.
Let's keep in touch. If you restart your efforts, I'll be happy to contribute. Meanwhile I'll try my best to get some info from the e/os forums and (pray) the lineageos residual devs.