compiling kernel on device (not-cross-compiling) - Asus Transformer TF700

I have Ubuntu installed on my TF701, and I'd like to attempt to compile android kernels on the device itself. I would think/hope that this would eliminate the need for a cross-compiling setup.
I'm also interested in compiling general linux kernels for use with ubuntu/debian on the device.
Has anyone done this before? Any pitfalls? Any suggested reading?

This should be possible, but it will be much slower than on a PC. Do you really want to wait hours for a compiled kernel?
If you are able to install the Android SDK on a PC, you are about one command line away from cross-compiling a kernel.

_that said:
This should be possible, but it will be much slower than on a PC. Do you really want to wait hours for a compiled kernel?
If you are able to install the Android SDK on a PC, you are about one command line away from cross-compiling a kernel.
Click to expand...
Click to collapse
PC is a lot faster...:good:
@_that
Have you try O3 flag on cortex a9 compiling on your kernel?

LetMeKnow said:
@_that
Have you try O3 flag on cortex a9 compiling on your kernel?
Click to expand...
Click to collapse
No - the general consensus seems to be that optimizing the kernel for speed is worse than optimizing for size, so I didn't try.

_that said:
No - the general consensus seems to be that optimizing the kernel for speed is worse than optimizing for size, so I didn't try.
Click to expand...
Click to collapse
Thanks...
---------- Post added at 10:07 AM ---------- Previous post was at 09:45 AM ----------
_that said:
No - the general consensus seems to be that optimizing the kernel for speed is worse than optimizing for size, so I didn't try.
Click to expand...
Click to collapse
Since you are talking about size, have you looked into the bionic patch? It is supposed to reduce the kernel's binary size quite a bit by removing and optimizing c headers in the source code...

LetMeKnow said:
Since you are talking about size, have you looked into the bionic patch? It is supposed to reduce the kernel's binary size quite a bit by removing and optimizing c headers in the source code...
Click to expand...
Click to collapse
Bionic is Android's C runtime library - what does it have to do with the kernel?

_that said:
Bionic is Android's C runtime library - what does it have to do with the kernel?
Click to expand...
Click to collapse
I don't know much about it and it is the reason that I am asking, haha... All I know is that it will find the unused c headers and compiling the source and create a smaller binary. For some reason, it also speed up your device. Nexus forum is discussing a lot between devs. It is just over my head atm and trying to understand it as much as I can... I may not understand it correctly and thanks for your time with a noob's question like this, haha...:laugh:

LetMeKnow said:
All I know is that it will find the unused c headers and compiling the source and create a smaller binary. For some reason, it also speed up your device.
Click to expand...
Click to collapse
LetMeKnow said:
Nexus forum is discussing a lot between devs.
Click to expand...
Click to collapse
Why don't you post links?

_that said:
Why don't you post links?
Click to expand...
Click to collapse
I would love to but I ran across this topic when I built my toolchain for tegra 3 t33 about 3 wks ago... I brought it up now since we are talking about size of the binary. If I remember correctly, the bionic patch is searching for working c headers and makes a new list before you compiles your source code... So that you are only compiling the usable source and remove the unused one.. The tool is find_your_cheaders.py. I have not used it and want to know if any dev on this forum using it with some experiences with this patch.. I will finish what I am doing and do more research on this topic and will bring you in with links and more information.. Thanks again for your opinions...

_that said:
This should be possible, but it will be much slower than on a PC.
Click to expand...
Click to collapse
I'm not so sure about that--I'm not a gamer-- my "PC" is a single-core Pentium-IV linux box.
_that said:
If you are able to install the Android SDK on a PC, you are about one command line away from cross-compiling a kernel.
Click to expand...
Click to collapse
On the other hand, if someone were to post a link to instructions about how to install a Android build toolkit on a Linux box...

Related

Any complete tutorial on compiling android ?

Can someone point me to a complete tutorial on how to compile android and add required drivers (from an official build image) ?
StalkingKillah said:
Can someone point me to a complete tutorial on how to compile android and add required drivers (from an official build image) ?
Click to expand...
Click to collapse
Do you mean compile a kernel from source?
There are a bunch of tutorials on this, here is a very good one.
http://forum.xda-developers.com/showthread.php?t=1748297
orangekid said:
Do you mean compile a kernel from source?
There are a bunch of tutorials on this, here is a very good one.
http://forum.xda-developers.com/showthread.php?t=1748297
Click to expand...
Click to collapse
I mean the kernel and UI
StalkingKillah said:
I mean the kernel and UI
Click to expand...
Click to collapse
Use that thread for compiling and modifying a kernel, that is the hardest part. Once you get that part, you can start to mess with UI stuff like launcher and themes and stuff.

Kernel Sources Available

For those interested:
http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=shortlog;h=refs/heads/rel-roth-ota-1
You'll also find a lot of other useful repos in there related to SHIELD (aka roth)
rel = Release (as opposed to dev)
roth = Jumble of the word THOR
mp = Original shipping image on the device
ota-1 = Day 0 OTA
agrabren said:
For those interested:
http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=shortlog;h=refs/heads/rel-roth-ota-1
You'll also find a lot of other useful repos in there related to SHIELD (aka roth)
rel = Release (as opposed to dev)
roth = Jumble of the word THOR
mp = Original shipping image on the device
ota-1 = Day 0 OTA
Click to expand...
Click to collapse
im pretty sure that at the rate things are going we will see something good coming out in the next few weeks...:good:
any update on android 4.3 build for shield? =)
1wayjonny said:
any update on android 4.3 build for shield? =)
Click to expand...
Click to collapse
Did you just say 4.3?
1wayjonny said:
any update on android 4.3 build for shield? =)
Click to expand...
Click to collapse
I'm not able to talk about that. That would be internal schedule details.
agrabren said:
I'm not able to talk about that. That would be internal schedule details.
Click to expand...
Click to collapse
Ah NP I completely understand!
wwjoshdew said:
Did you just say 4.3?
Click to expand...
Click to collapse
He did, as did google. The 2nd gen nexus 7 is shipping with 4.3 and several high end devices are getting 4.3 updates too. Kinda logical that the shield would get it eventually.
One review I read said the target was 4-6 weeks after the google update. Is that still the goal or could it be faster?
agrabren said:
For those interested:
http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=shortlog;h=refs/heads/rel-roth-ota-1
You'll also find a lot of other useful repos in there related to SHIELD (aka roth)
rel = Release (as opposed to dev)
roth = Jumble of the word THOR
mp = Original shipping image on the device
ota-1 = Day 0 OTA
Click to expand...
Click to collapse
How do you git clone from there? I want to see those repos.
edit nvm found this if anyone wants to help get a rom working chat with me on gmail [email protected]
https://github.com/linux-shield/kernel/commits/roth
Unjustified Dev said:
How do you git clone from there? I want to see those repos.
edit nvm found this if anyone wants to help get a rom working chat with me on gmail [email protected]
https://github.com/linux-shield/kernel/commits/roth
Click to expand...
Click to collapse
Just follow the directions here: https://developer.nvidia.com/develop4shield#OSR
agrabren said:
Just follow the directions here: https://developer.nvidia.com/develop4shield#OSR
Click to expand...
Click to collapse
thanks synced the source its pretty weird but thanks
Could you please run the extract blob script and upload them so I can take a look ?
Unjustified Dev said:
thanks synced the source its pretty weird but thanks
Could you please run the extract blob script and upload them so I can take a look ?
Click to expand...
Click to collapse
You can run the extract blob script. It contains a license which I haven't bothered to read. I'm hoping to have a github up this weekend with all the required blobs.
agrabren said:
You can run the extract blob script. It contains a license which I haven't bothered to read. I'm hoping to have a github up this weekend with all the required blobs.
Click to expand...
Click to collapse
I don't have it yet , yes it does have license but it's open source https://github.com/Project-Sheild/android_device_nvidia_roth
I will upload the rest
I didnt respond on the other thread I got tired of going back and forth lol
One more question ( I have the blobs) what is vendor/nvidia/build for its making cm-10.1 fail?
just wanted to ask, before cloning the whole repo, what wlan driver does the shield use or where to get the defconfig for the shield kernel (couldnt find it in the kernel directory on git provided here)
thanks
crnkoj said:
just wanted to ask, before cloning the whole repo, what wlan driver does the shield use or where to get the defconfig for the shield kernel (couldnt find it in the kernel directory on git provided here)
thanks
Click to expand...
Click to collapse
No idea on wifi, but the config is available on the device in /proc/config.gz
agrabren said:
No idea on wifi, but the config is available on the device in /proc/config.gz
Click to expand...
Click to collapse
Don't have the device yet, was just wondering about the wifi driver used. Could you perhaps fetch the config.gz for me please? Thanks for the info.
Wifi driver is bcmdhd (drivers/net/wireless/bcmdhd) on Android kernel.
Gnurou said:
Wifi driver is bcmdhd (drivers/net/wireless/bcmdhd) on Android kernel.
Click to expand...
Click to collapse
so its a broadcomm chipset?
Thank u

[Q] How to force legacy build type instead of .new.dat form of packaging a build?

I did find this: http://forum.xda-developers.com/showthread.php?t=2936721
however when I looked in the makefile, I found absolutely no flag, but still it builds in block form whenever I try to build something, and ends up failing to flash with a "can't execute updater binary/script" or whatever error. Any idea how to force it to build in a legacy manner, or is it just something that would require practically porting stuff to source code of kitkat to get that to work? I'm building from cm12 source from the cyanogenmod repos, with proprietary blobs pulled from the phone running a different cm build/some other repo at times, same thing both ways.
dreamwave said:
I did find this: http://forum.xda-developers.com/showthread.php?t=2936721
however when I looked in the makefile, I found absolutely no flag, but still it builds in block form whenever I try to build something, and ends up failing to flash with a "can't execute updater binary/script" or whatever error. Any idea how to force it to build in a legacy manner, or is it just something that would require practically porting stuff to source code of kitkat to get that to work? I'm building from cm12 source from the cyanogenmod repos, with proprietary blobs pulled from the phone running a different cm build/some other repo at times, same thing both ways.
Click to expand...
Click to collapse
Questions belong in Q&A, not the dev section.
You will have the option to build a block or file-based ROM zip when CM is ready.
upndwn4par said:
Questions belong in Q&A, not the dev section.
You will have the option to build a block or file-based ROM zip when CM is ready.
Click to expand...
Click to collapse
Sorry I posted in the wrong section
But I tried building from aosp source and got the same result
dreamwave said:
Sorry I posted in the wrong section
But I tried building from aosp source and got the same result
Click to expand...
Click to collapse
Search in the build folder for the ota_from_target_files then look for this line "OPTIONS.block_based" then set it to True.
Gnome said:
Search in the build folder for the ota_from_target_files then look for this line "OPTIONS.block_based" then set it to True.
Click to expand...
Click to collapse
Thanks you, I'm building now and will report back if it works. I was looking for literally hours for some way to modify something to make it work, can't believe I missed that.
upndwn4par said:
Questions belong in Q&A, not the dev section.
You will have the option to build a block or file-based ROM zip when CM is ready.
Click to expand...
Click to collapse
Might be better going in the dev discussion forum.
dreamwave said:
Thanks you, I'm building now and will report back if it works. I was looking for literally hours for some way to modify something to make it work, can't believe I missed that.
Click to expand...
Click to collapse
Set it to False sorry
dreamwave said:
Thanks you, I'm building now and will report back if it works. I was looking for literally hours for some way to modify something to make it work, can't believe I missed that.
Click to expand...
Click to collapse
I recently went back to a block based ROM zip because it flashes so damn fast. File based ROM will be slow...
Gnome said:
Set it to False sorry
Click to expand...
Click to collapse
it was false, already
Wakamatsu said:
Might be better going in the dev discussion forum.
Click to expand...
Click to collapse
That forum is for higher level discussions. This is just a question. But, the mods will decide.
OK, so I went into that file, changed the default flag inside to true and the lower part that defines what happens with an if/if not kind of thing, and (low and behold) it compiled with a legacy style. I now have a different problem, though the same as I had before. When I try to install it with the latest multirom (I'm backing up to try and flash as a main rom) it fails, saying that there was an error executing updater binary in zip "/tmp/mr_update.zip" and it doesn't install at all. Any ideas what may be the problem now?
Gnome said:
Set it to False sorry
Click to expand...
Click to collapse
I flashed it as a normal rom, and it flashed fine. Now I have a problem that it just doesn't boot. I power on the device and it shows the google logo for a while, then just reboots. Bootloop. I didn't get any errors compiling, it worked fine and flashed fine as a normal rom, but doesn't boot.
upndwn4par said:
That forum is for higher level discussions. This is just a question. But, the mods will decide.
Click to expand...
Click to collapse
You're right. Dev section is for ongoing project discussions and actual development. Any question, be that app, development, accessory etc all belong on q&a.
The rule, if its a question, q&a

Custom Rom for Galaxy J700T ??

Are there any custom roms or stock stripped roms out>??? PLOX post links!!!!!!!!!!
I've been wondering the same thing since June. Seems like all the ROMs are geared towards the F/H/M. I've have tried installing ROMs for other variants with messi2050's kernel. The only one I got to boot was the Note 7 ROM by Allosh. But WiFi did not work.
Hmmm... Any other issues? What about that ROM allowed for you to boot and function I wonder?
If we can get a bounty going for WiFi fix on that ROM we could possibly be on to something....!!!!!!!!!!!!!!!!!!!!!!!
carpenterethan said:
Hmmm... Any other issues? What about that ROM allowed for you to boot and function I wonder?
If we can get a bounty going for WiFi fix on that ROM we could possibly be on to something....!!!!!!!!!!!!!!!!!!!!!!!
Click to expand...
Click to collapse
Just copy the wifi files in /system/etc from a stock firmware with a root file manager to the same folder and give it the correct permissions in the N7 rom. The real problem is getting the Camara to work.
I just want a rom with an AOSP based system UI.
phoen1x74 said:
I just want a rom with an AOSP based system UI.
Click to expand...
Click to collapse
My best advice for you is to deodex your factory ROM and decompile your system framework apk(s). All of the ports you see are derived the same way. This device will never see CM/RR/Lineage ported over.
Is there any custom ROM for j700t?
Metabolic12 said:
My best advice for you is to deodex your factory ROM and decompile your system framework apk(s). All of the ports you see are derived the same way. This device will never see CM/RR/Lineage ported over.
Click to expand...
Click to collapse
Why do you think this phone will never see CM/RR/Lineage? I think its possible, but we would need is a good dedicated dev that can figure out how to port or build them.
vekenti said:
Why do you think this phone will never see CM/RR/Lineage? I think its possible, but we would need is a good dedicated dev that can figure out how to port or build them.
Click to expand...
Click to collapse
Actually it will be easy to port lineage for j700t, it only has different drivers and ram size than j700h
messi2050 said:
Actually it will be easy to port lineage for j700t, it only has different drivers and ram size than j700h
Click to expand...
Click to collapse
If you make one, I'd love to try it out. Despite the conflict that this community has had between you, you are our only dev and you are a good one.
I agree. I would LOVE to try out a good lineage port. This phone really needs a good ROM, because Touchwiz really sucks.
messi2050 said:
Actually it will be easy to port lineage for j700t, it only has different drivers and ram size than j700h
Click to expand...
Click to collapse
Heck Messi is easily the best dev we have. If you could spare some time I'd be willing to give it a shot.
phoen1x74 said:
If you make one, I'd love to try it out. Despite the conflict that this community has had between you, you are our only dev and you are a good one.
Click to expand...
Click to collapse
vekenti said:
I agree. I would LOVE to try out a good lineage port. This phone really needs a good ROM, because Touchwiz really sucks.
Click to expand...
Click to collapse
Metabolic12 said:
Heck Messi is easily the best dev we have. If you could spare some time I'd be willing to give it a shot.
Click to expand...
Click to collapse
thank u but unfortunately that won't be possible as i don't have the phone...
messi2050 said:
thank u but unfortunately that won't be possible as i don't have the phone...
Click to expand...
Click to collapse
I can go to git and setup the build environment, I've been following your work and aapav rather closely. I would just need your brain to help me change the ram and cache values and whatever else needs adjusted. Then once finished I could send you the files for upload.
Metabolic12 said:
I can go to git and setup the build environment, I've been following your work and aapav rather closely. I would just need your brain to help me change the ram and cache values and whatever else needs adjusted. Then once finished I could send you the files for upload.
Click to expand...
Click to collapse
Sweet i would like to help, Do you know how to cherry pick commits ?
messi2050 said:
Sweet i would like to help, Do you know how to cherry pick commits ?
Click to expand...
Click to collapse
Request new pull from another repo then another pull into said repo if I'm not mistaken?
Metabolic12 said:
Request new pull from another repo then another pull into said repo if I'm not mistaken?
Click to expand...
Click to collapse
No i meant to cherry pick other developers commits and apply it to your repo ( cherry pick ) if you don't know how to do that i can't help since the most difficult part will be to patch the kernel...
messi2050 said:
No i meant to cherry pick other developers commits and apply it to your repo ( cherry pick ) if you don't know how to do that i can't help since the most difficult part will be to patch the kernel...
Click to expand...
Click to collapse
I think I know what you're explaining. Can you give me a night to refresh my memory on kernel sourcing and setting up the environment? If it's too much for me I won't waste time, I'll just tell you it's out of my league.
Metabolic12 said:
I think I know what you're explaining. Can you give me a night to refresh my memory on kernel sourcing and setting up the environment? If it's too much for me I won't waste time, I'll just tell you it's out of my league.
Click to expand...
Click to collapse
You should check this thread first
https://forum.xda-developers.com/showthread.php?t=1877040
you can start a bounty thread too, i'm sure this way many developers not only me will be interested on doing it

Nokia 3 Kernel Source Now Availble

Kernel Sources for the Nokia 3 has been release. :fingers-crossed:
https://www.gsmarena.com/nokia_3_kernel_source_code_released-news-31109.php
Download Here:
https://www.nokia.com/en_int/phones/opensource
Oh yes I'm so happy now
Downloading...
WHAT A SURPRISE TRULY!!
Thanks Nokia aka HMD Global aka FIH way to go guys
Now we need to upload it on GitHub.
SkaboXD said:
Now we need to upload it on GitHub.
Click to expand...
Click to collapse
Already done.
Just trying to put together the Oreo device and vendor tree's before i push them to github too.
https://github.com/bigrammy/android_kernel_nokia_ne1
bigrammy said:
Already done.
Just trying to put together the Oreo device and vendor tree's before i push them to github too.
https://github.com/bigrammy/android_kernel_nokia_ne1
Click to expand...
Click to collapse
nice, it will be the best to upload 7.1.1 and eventually 7.0 kernel source too.
I'd love to do it but i never uploaded on github.
So I just need to upload, no modifing or changing settings?
SkaboXD said:
nice, it will be the best to upload 7.1.1 and eventually 7.0 kernel source too.
I'd love to do it but i never uploaded on github.
So I just need to upload, no modifing or changing settings?
Click to expand...
Click to collapse
I could push them later but don't really see much point as most people will want to go forward rather than backwards 8.0 > 8.1 > 9.0 etc etc
Even with the Kernel source It will still require a lot of work to get a fully working device and will likely require some assistance from one of the more experienced MediaTek Dev's who are used to working with source code
I agree, but some people don't like Oreo and want to use Nougat. We can make another thread asking people for help.
please compile an overclocked kernel ...
Riadh300 said:
please compile an overclocked kernel ...
Click to expand...
Click to collapse
we can overclock it from 1250mhz to 1300mhz, just a little difference. GPU can't be overclocked though.
@varun.chitre15 maybe your interested on this device?
Compiler Errors
Did anyone manage to successfully manage to compile the kernel using the Oreo Kernel source??
I keep getting compile errors but not sure if it's my set up (Arch Linux) or if the source is broken
did anyone have a working kernel ?
Riadh300 said:
did anyone have a working kernel ?
Click to expand...
Click to collapse
I think the Oreo Kernel source is broken/missing bits which is kind of annoying when you spend hours fixing one thing then something else further down the build fails to compile and it quits. :crying:
It could be me just not knowing what I am doing :silly: as I am new to actually compiling kernels so still lots to learn for me but I would like to know if ANYONE has had a successful build or not especially someone who is experienced.?? :fingers-crossed:
Which version of kernel that you have ?
SkaboXD said:
nice, it will be the best to upload 7.1.1 and eventually 7.0 kernel source too.
I'd love to do it but i never uploaded on github.
So I just need to upload, no modifing or changing settings?
Click to expand...
Click to collapse
Hey Here! Is the Nougat Kernel Source
https://github.com/ChalapathiRevanth/kernel_nokia_NE1
This Compiles Out Succesfully!Both Nougat and Oreo Kernel Compiled For Me Succesfully
---------- Post added at 07:22 AM ---------- Previous post was at 07:22 AM ----------
[/COLOR]
bigrammy said:
Did anyone manage to successfully manage to compile the kernel using the Oreo Kernel source??
I keep getting compile errors but not sure if it's my set up (Arch Linux) or if the source is broken
Click to expand...
Click to collapse
Hey Here! Is the Nougat Kernel Source
https://github.com/ChalapathiRevanth/kernel_nokia_NE1
This Compiles Out Succesfully!Both Nougat and Oreo Kernel Compiled For Me Succesfully
Now we need to build device tree, I never did that so i will look for guides on xda, youtube etc.
Is anybody compile the kernel ?
Checked that the Nokia 3 V5.180 Kernel Source can be complied successfully,
But Nokia 3 V5.220 kernel source is failed with file missing...
natsupeng said:
Checked that the Nokia 3 V5.180 Kernel Source can be complied successfully
Click to expand...
Click to collapse
How did you compile it? which toolchain and config files you used? I always get compile time errors, tried different toolchains and config files.

Categories

Resources