[Q] Compile modules withouth kernel source ? - Android Q&A, Help & Troubleshooting

Hi guys,
I'm basically a total noob on Linux territory so my question may appear stupid
Is it possible to compile Kernel modules without having the kernel source code of the device ?​
I want to compile some kernel modules (most important: bluetooth.ko, btusb.ko and ntfs.ko), but my device is a no-name Brand, so i won't get the kernel source code :-(
Thanks in beforehand

bump
It is possible if i have the whole system image, the kernel must be somewhere inside there ?
(as i said i'm a linux noob)

If you have the whole image then yes. I would send the OEM an EMAIL asking for the kernel source as by law they have to under the GPL.

Related

[Q] Extract device proprietary files

Hello All,
I have XTouch X507S it is MTK6577 http://www.xtouch.ae/plus/view.php?aid=735, it is JB 4.1.1 and I want to compile AOSP 4.2.2 to it, I've successfully unlocked the bootloader, and ported a TWRP but I want to know how to extract device proprietary files?
Thanks
You will also need the kernel source for the device. You will need a Linux set up and you can find tuts all over on how to build from source but without the device tree you may be physics of luck.
Wayne Tech Nexus
zelendel said:
You will also need the kernel source for the device. You will need a Linux set up and you can find tuts all over on how to build from source but without the device tree you may be physics of luck.
Wayne Tech Nexus
Click to expand...
Click to collapse
I've already the setup linuz and I've alredy compiled AOSP for skate, and I have the kernal source so what is the device tree you are talking about (do you mean vendor/......) or just the kernal ?
And from where shall I optain the device tree?

[Q] Compiling Kernel From Source

Hi everyone, I am looking for a point in the right direction or any advice.
My device is Samsung Galaxy Note 3 SM-N9005. I know there is a forum for that device but I feel I need help from experienced kernel devs and I am unsure where to ask for help
I have downloaded the source files from Samsung for this device (it has kernel and platform archives).
I have a linux dev environment setup in virtual machine. I successfully compiled the kernel zImage. I managed to unpack the current boot.img and replace the zImage and repack and the phone boots. So that is a success for a first time hey?
However, WIFI does not work. I have read that I have to compile the wifi module for it, but I am clueless.
Do I, or don't I, need the Android 4.3 source code from Google?
Do I have to run "make menuconfig" and enable modules (currently not enabled)?
Do I have to somehow compile a wifi module?
Any help will be massively appreciated!!!
Thanks
Dan

[Q] Where to start for Android Kernel Development?

Hello Guys,
I see a lot of threads for starting with android rom development, but can anyone give me pointers for kernel development? I would like to start kernel development and do not know where to start. I am not interested in rom development at the moment, but that is because I assume that the android rom is like a user space app over the kernel. Please correct me if I am wrong. It would be great if you guys could point me to some beginner friendly kernel development tutorials. I am looking through Linux Device Drivers (LDD) book but am having a hard time comparing that with android. I have cloned mediatek 6589 source from android repository. I am submitting partial url cos I am not allowed to submit full url yet. URL(android.googlesource.com/kernel/mediatek/+/android-5.1.0_r0.2) since I am running a mtk6589 device (Walton X1/ Gionee Dream D1) and would like to understand where to start coding kernels for android. Any help would be greatly appreciated.
Oh and I would like mediatek specific help if possible. I have gone through some of the general kernel building and overclocking tutorials. I want to do some more enhancements if possible. Since mediatek seems to be the mysterious one with bare minimum source availability, I would like to take up that challenge
Thanks.
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Thanks for the Pointer Mate
_that said:
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Click to expand...
Click to collapse
Thanks man. Really appreciate the pointers. I do have some of the checklists done. Like
* Kernel source tree
** A cross compiler toolchain to generate ARM code (using the precompiled one)
* A way to install that boot image on your device
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools. Thanks mate. Mediatek is apparently one hell of a problem child XD
syko_kickass said:
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools.
Click to expand...
Click to collapse
If you're lucky, your existing kernel exposes its config in the file /proc/config.gz. If not, I don't know how to get a matching config - best is to avoid buying anything from GPL violators.

[Q] Porting kernel?

Hi guys, I'm doing a Cyanogenmod 12.1 porting for my device that is unsupported. I can build everything and I get a flashable zip but I'm using a prebuilt stock kernel image extracted from the stock lollipop rom. After flashing, the phone does not boot and It's impossible even to access to logcat, so I think it's a kernel related issue. My question is:
- I have the stock kernel source (v.3.10) given by the vendor
- I have the cyanogenmod kernel source (v.2.69)
Do I have to build the stock kernel or I can build the cyanogenmod one by merging the drivers modules and others stuff?
And if I flash a wrong kernel image can my device become unusable?
I read that is not fair importing built kernel modules from other kernel version, but if I merge the kernel trees, is it the same?
Sorry in advance if my question is a noob question
Well I don't know much about porting roms or kernels though. But with what I've heard flashing the wrong kernels can permanently render your phone useless..
Sent from my Tecno F7 a ...?

Question about kernel, no noobs please :D

Hi, this is my first post on xda, but i was reading it about 4 years and now i have unusuall question:
I have phone - samsung callisto (GT-I5510) with cyanogenmod 10.2 rom (android 4.3.1), and kernel sources are available for it, but only below 2.6.35.7 since phone is ancient. This is "latest" and probably "fastest" android phone with qwerty keyboard (not including this unrootable new blackberrys), so i think that it would be nice idea to deploy lightweight kali linux nethunter installation for hacking purpouses. I had some problems with oficial installer, and i had to modify it to allow install on device with such small /system partition, but the problem is that chrooting to Kali Roling is not working, becouse minimal kernel version needed is 3.2.*.*
Question is: Can i somehow "update" kernel sources of this device, so i can build 3.2.*.* kernel? I have much free time and even more determination to do this.

Categories

Resources