Compiling source with .mk files help - Nexus 5 Q&A, Help & Troubleshooting

I have compiled java based source code into APKs. Either with gradlew or ant. I cannot however figure out how to compile aosp based source. Like their keyboard has no manifest. Just a dot mk file. I have little experience with cross compilation. I CCd one c program I wrote with the NDK and cmake. Is there a special procedure or do I compile with the ndk? Ive seen lunch thrown around in forums. Can someone help me out please?

What are you trying to compile? AOSP source to build a ROM? Individual AOSP app?

Elluel said:
What are you trying to compile? AOSP source to build a ROM? Individual AOSP app?
Click to expand...
Click to collapse
Individual AOSP app. The keyboard.

codecaine21 said:
Individual AOSP app. The keyboard.
Click to expand...
Click to collapse
http://xda-university.com/as-a-developer/downloadcompile-specific-rom-parts

Elluel said:
http://xda-university.com/as-a-developer/downloadcompile-specific-rom-parts
Click to expand...
Click to collapse
Thank you

Related

add own kernel source into rom source

ok i want to add my own kernel source into my aokp source, how would i edit the manifest.xml file to stop getting the kernel source form CM's kernel tree, and instead use my source like so: https://github.com/azoller1/android_kernel_asus_grouper
would i have to create a local_manifest?
azoller1 said:
ok i want to add my own kernel source into my aokp source, how would i edit the manifest.xml file to stop getting the kernel source form CM's kernel tree, and instead use my source like so: https://github.com/azoller1/android_kernel_asus_grouper
would i have to create a local_manifest?
Click to expand...
Click to collapse
You will have to create a local manifest and then remove the project.. And add your own. I don't think this question belongs here. I think you can post either in the Q and As / some help thread or try and check out this thread. Hope this helps.
i just clone mine manually into kernel/asus/, calling it somn different and edit the device/asus/grouper/BoardConfigCommon.mk to
`...
TARGET_KERNEL_CONFIG := oxydo_defconfig
TARGET_KERNEL_SOURCE := kernel/asus/oxydo
...`
ofc some kernels require different toolchains, but that's a different question
Sent from my Nexus 7

Upgrading linux on custom kernel

Hi all,
Following advices from the site I successfully compiled a custom kernel from sources, rebuilt boot.img and the ramdisk and flashed it on my S3: it works.
Now I want incrementally upgrade the Linux part using git and the sources at kernel.org, let say to patch the kernel on the disk with the linux online versions 3.0.50, 3.0.51 and so on up to the latest 3.0.100. Never used git before unfortunately
Can someone please point me to an example of the correct command-line to do that? From then on I'll sort the rest by myself, I promise, that would save me a lot of time and unnecessary troubles. Thank you very much.
PU
Look up "git-cherry-pick".
reS28raM said:
Hi all,
Following advices from the site I successfully compiled a custom kernel from sources, rebuilt boot.img and the ramdisk and flashed it on my S3: it works.
Now I want incrementally upgrade the Linux part using git and the sources at kernel.org, let say to patch the kernel on the disk with the linux online versions 3.0.50, 3.0.51 and so on up to the latest 3.0.100. Never used git before unfortunately
Can someone please point me to an example of the correct command-line to do that? From then on I'll sort the rest by myself, I promise, that would save me a lot of time and unnecessary troubles. Thank you very much.
PU
Click to expand...
Click to collapse
Look up "git merge". Also you have to add the tree from kernel.org.
Mine looks like such.
git merge linux/linux-3.4.y
CNexus said:
Look up "git-cherry-pick".
Click to expand...
Click to collapse
Hi mate, I am using your tools to build the images, thanks for that. I'll do
PwnCakes193 said:
Look up "git merge". Also you have to add the tree from kernel.org.
Mine looks like such.
git merge linux/linux-3.4.y
Click to expand...
Click to collapse
Thanks, I'll investigate both of your suggestions! Today it'll be a busy day.
reS28raM said:
Hi mate, I am using your tools to build the images, thanks for that. I'll do that
Thanks, I'll investigate both of your suggestions! Today it'll be a busy day.
Click to expand...
Click to collapse
No problem
You'll probably go with the suggestion after mine, git-cherry-pick is more to add one or a couple commits, rather than a whole mass of commits
Git-merge is for adding larger chunks of commits/merging branches, etc

[Q] building from source questions

I just built android AOSP from source from googles repo. I didn't use the OTA pakage command because it kept telling me that it wasn't installed or whatever. So I built it and now I have the .IMG files in my out folder. My question is, is there any way that I can turn those .IMG files into a zip? And if I were to start cherry picking from git or gerrit, will it have to rebuild the entire ROM or will it just recreate the parts of the ROM that I cherry picked?
What command did you use? I haven't built AOSP for ages.
"Make installclean" is a good command to use before you build but after you cherry pick. It will clean what is needed to be cleaned. If you're using CCache you could have a build pretty quickly
Sent from my Nexus 5 using Tapatalk
skeliton lord said:
... And if I were to start cherry picking from git or gerrit, will it have to rebuild the entire ROM or will it just recreate the parts of the ROM that I cherry picked?
Click to expand...
Click to collapse
unless you do a clean/clobber, it should usually only rebuild the changes/dependant parts.
f14w3d said:
unless you do a clean/clobber, it should usually only rebuild the changes/dependant parts.
Click to expand...
Click to collapse
rootSU said:
What command did you use? I haven't built AOSP for ages.
"Make installclean" is a good command to use before you build but after you cherry pick. It will clean what is needed to be cleaned. If you're using CCache you could have a build pretty quickly
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
So i have to use the make installclean command and it won't rebuild the entire ROM?
And do you happen to know a way to merge .IMG files into a flashable zip?

Device tree, vendor files.

Hi, I'm currently trying to build AOSP for our device from source however I cannot figure out how to add device support, I've followed so many guides on editing the local_manifests.XML but I can't seem to get it to work.
Can any of our devs explain to me how to build AOSP with the addition of our device support? I'm not entirely worried about kernel ATM as our source was released so I will build that.
I just can't for the life of me add device support properly.. Could anyone link me to a guide or some other stuff to read? Google is very unhelpful when googling Linux related issues.
Edit - to clear up any confusion bottom line as of right now I basically need to know how to implement the device tree we already do have (several github links, mainly cm based) into my AOSP source.
Would I just technically copy the files into Google's already created device/vendor/ folders?
https://source.android.com/source/add-device.html using this link as reference. May be very bland.
christopherrrg said:
Hi, I'm currently trying to build AOSP for our device from source however I cannot figure out how to add device support, I've followed so many guides on editing the local_manifests.XML but I can't seem to get it to work.
Can any of our devs explain to me how to build AOSP with the addition of our device support? I'm not entirely worried about kernel ATM as our source was released so I will build that.
I just can't for the life of me add device support properly.. Could anyone link me to a guide or some other stuff to read? Google is very unhelpful when googling Linux related issues.
Edit - to clear up any confusion bottom line as of right now I basically need to know how to implement the device tree we already do have (several github links, mainly cm based) into my AOSP source.
Would I just technically copy the files into Google's already created device/vendor/ folders?
https://source.android.com/source/add-device.html using this link as reference. May be very bland.
Click to expand...
Click to collapse
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
am2012 said:
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
Ya you can dl the source for both the device and vendor ........copy them over to the source and you shouldn't have a problem
am2012 said:
Try building CyanogenMod instead. They have device specific instructions!
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
he's trying to build aosp.. why would he build cyanogenmod?
HelpMeruth said:
he's trying to build aosp.. why would he build cyanogenmod?
Click to expand...
Click to collapse
Fair enough. I imagine as he posted this 6 months ago, he has been successful in his attempts!

Kernel compilation error

almost compiled but one error????
make[1]: Nothing to be done for 'dtbs'
any solution...
and
zImage is not there. only "Image" and "Image.gz" present there
is "Image" is zImage? how to check that??
Thank you..
kernel source - Xiaomi mi4i official source
toolchain- NDK version 4.9
Ubuntu 64 bit?
[email protected] said:
OP
Click to expand...
Click to collapse
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
faizauthar12 said:
Change module to be y at defconfig
Also image it's the kernel
Image vs zImage ... You can google it
Also ,micode source code it's full of bugs
Click to expand...
Click to collapse
Yeah what he said. Checkout these repos if you need to compile a kernel:
http://gitlab.com/webhaikal/SenseiFerrari
http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari
haikalizz said:
Yeah what he said. Checkout these repos if you need to compile a kernel:
[url]http://gitlab.com/webhaikal/SenseiFerrari[/URL]
[url]http://github.com/Ferrari-Dev-Team/android_kernel_xiaomi_ferrari[/URL]
Click to expand...
Click to collapse
yeah i gone through your sensie kernel repo and found that i have to use dtbToolCM to make boot.img so i did it and stuck here...
DTB combiner:
Input directory: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/'
Output file: '/home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dt.img'
Searching subdir: /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/boot/dts/include/ ...
=> Found 0 unique DTB(s)
as i have read various threads but can not able to fix this. i have used dtbToolCm and dtbtool (version -3 and -2) also same result..
Really i should had not start making my first kernel with MI...
or it will make me learn more and more..
hahahaha:silly:
the easy steps to make a new kernel
use the entirely CM source code
then just type "make bootimage"

Categories

Resources