I have tried to replace the file system utilities in ClockworkMod with newer ones. Consequently, I have tried to compile them by myself. As far as I could see, they are statically built. Unfortunately, I wasn't able to find any flag in order to build them statically. Could anyone tell me how to do this? I have the entire CyanogenMod source tree and I was able to successfully build the entire firmware for HTC Desire more times.
Since my last message, I've been able to statically build the e2fs tools with the NDK (actually, a separate toolchain based on NDK). Now I am struggling with parted. The configuration stage of parted is able to use the e2fsprogs libraries but I have some problems compiling it. The compiler says something about expected specifier-qualifier-list before 'time_t' in usr/include/linux/time.h of the toolchain.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
Related
I would like to post a general question about kernel development!
Background:
I've started to look into what it take so to develop a kernel of my own, and I'm guessing its no small undertaking even though everything is linux based... which means all the source exists already. I'm learning linux is awesome in that respect.
Question:
Any reason I can't use google's NDK to do development? I've learned it has the necessary cross compiler for the arm... or at least I think it does.
Ok, let me re-word the question.
I downloaded the kernel source from htc for the thunderbolt. The first thing I did was attempt to compile the source on my Ubuntu computer. After setting up the .config file for the thunderbolt, I soon found I needed an arm cross compiler. I also found NDK includes an arm cross compiler.
I downloaded it, modified the Makefile (I know... there are better ways instead of modifying the Makefile) to point to the NDK cross compiler and it compiled.
My question is... is there any reason I can't use the files that resulted (zImage --> boot.img) on my thunderbolt? Just trying to learn. Should I post this somewhere else?
toymachine115 said:
Ok, let me re-word the question.
I downloaded the kernel source from htc for the thunderbolt. The first thing I did was attempt to compile the source on my Ubuntu computer. After setting up the .config file for the thunderbolt, I soon found I needed an arm cross compiler. I also found NDK includes an arm cross compiler.
I downloaded it, modified the Makefile (I know... there are better ways instead of modifying the Makefile) to point to the NDK cross compiler and it compiled.
My question is... is there any reason I can't use the files that resulted (zImage --> boot.img) on my thunderbolt? Just trying to learn. Should I post this somewhere else?
Click to expand...
Click to collapse
Any ARM toolchain should work, though the android NDK is not always the easiest one to use. Best way to see if you compiled it correctly is to test it of course. Back up your current phone state first of course.
Thanks! I'll attempt it.
Main thing I was going for was to avoid the NO do not use the NDK cross-compiler... so looks like it is ok.
I've had a search and a look around but can't see anything specific enough to answer this.
I have read that the SGS2 uses the new BCM4330 chipset for it's WiFi-N support.
It looks to me that for existing kernels they are using either the existing kernel support or possibly the b43 driver.
I need to find out, and while I have compiled custom kernels in nix in the past, I have never done so in Android, so I'm a little out of my comfort zone here.
I want to compile a kernel where the WiFI driver will support monitor mode, ideally it would be the CM7 kernel with just this extra functionality added, however a number of the tools that I would use to identify the existing configuration do not seem to be available in the standard CM7 build (lspci being one).
I don't want to frack around too much without having read up first so could anyone point me at a good guide for creating my own Android Kernel, even better if the guide was specific to the CM7 version.
Lastly I mostly run a Fedora environment, however the bits I have read seem to suggest a number of tools are only available in a Ubuntu guise (heimdall springs to mind and while I'm sure it's possible to recreate it for Fedora I'm trying to reduce the number of dependencies I'll have to recreate as much as possible). Therefore can I get some advice regarding the least complicated way to generate an Android build environment in Linux.
Thanks
For kernel compilation on android, you can check the several repositories there are for the several kernels. Depending on each kernel/repository/user, you can find a predefined .config inside them, so you can get the basic configuration to compile the kernel, don't know if CM7 has it in its repository...
As for the enviorment, I haven't tried compiling a kernel, but I did compile some ROM on Gentoo Linux, so I suppose it could also be done in Fedora without many problems. The main thing about using Ubuntu is that is very extended, so they're using it as main Linux base, but that doesn't mean it can't be done in other linux distros. You can check CM7 wiki for building from source to install the required packages for your enviorment. In my case I cross checked the Ubuntu packages with Gentoo to install gentoo's version of that packages/tools to be able to compile without problems.
Also in the case of building kernels, you need a toolchain to be able to compile, but there are several webs/tutorials with info on how to use that.
EDIT: You have a complete tutorial for CM7 in their wiki with the needed packages for both Debian and Red Hat based distributions...
Very useful, thanks for the info.
Very useful info.
Hi,
I'm interested in compiling a custom kernel to support wifi monitor mode, but I read in a previous post that it can be a hardware limitation which makes it impossible to use monitor mode. Can anyone confirm that? Maybe a statement/answer from Broadcom?
I'm just asking it because I don't want to start playing with kernel compilation and driver hacking if it can't be done because of some missing code on the chipset or something.
Thanks.
kepten said:
Can anyone confirm that? Maybe a statement/answer from Broadcom?
Click to expand...
Click to collapse
I doubt Broadcom will answer that, but you can try to search the chipset info in Broadcom's web and see if its supported. Also you can check kernel modules if they can compile against that version.
AzureusPT said:
I doubt Broadcom will answer that, but you can try to search the chipset info in Broadcom's web and see if its supported. Also you can check kernel modules if they can compile against that version.
Click to expand...
Click to collapse
Well, Broadcom's website says nothing about monitor mode but I've found a driver (https:// github.com/cyanogen/galaxy-2636/blob/ics/drivers/net/wireless/bcm4330/src/include/wlioctl.h#L1153) which at least mentions it. This is for Galaxy Tab 10.1 which has the same chipset so maybe someone with a Tab 10.1 could verify if monitor mode works with that kernel/driver? ??
Hallo i am trying to look into android goldfish code and probably make some changes in it. As it is a long way to go for me i am actually unable to decide the tools that i need to set up. I come from an IDE based programming experience so am always trying to find a walk through tutorial to get goldfish kernel code in eclipse CDT to browse and code but no luck.I have followed the post source.android.com/source/building-kernels.html and built the kernel accordingly. i know that its a basic linux kernel and so tried it along the lines of this post wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source but am still not confident of my setup. can some one please guide me through my new venture into this wild, vast and crazy field ?
crouchtiger said:
Hallo i am trying to look into android goldfish code and probably make some changes in it. As it is a long way to go for me i am actually unable to decide the tools that i need to set up. I come from an IDE based programming experience so am always trying to find a walk through tutorial to get goldfish kernel code in eclipse CDT to browse and code but no luck.I have followed the post source.android.com/source/building-kernels.html and built the kernel accordingly. i know that its a basic linux kernel and so tried it along the lines of this post wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source but am still not confident of my setup. can some one please guide me through my new venture into this wild, vast and crazy field ?
Click to expand...
Click to collapse
Yes, you'll need a Linux environment, mostly 64-bit based, compiler toolchain and some additional packages/libs.
For more info: http://forum.xda-developers.com/showthread.php?t=1748297
I tried compiling the original kernel I have running on my Nexus 7 2013.
So I did
git clone https://android.googlesource.com/kernel/msm -b android-msm-flo-3.4-kitkat-mr2
git checkout -f ac9222cf61b2646a1862fb222365e52a0d1c498d
export ARCH=arm flo_defconfig
export SUBARCH=arm
export CROSS_COMPILE/home/armtoolchain-prebuilt-4.8/bin:$PATH
make -j2
Click to expand...
Click to collapse
that last checkout of commit ac9222cf61b2646a1862fb222365e52a0d1c498d is the one my Nexus 7 2013 Wi-Fi originally came with. Now since I used the prebuilt binaries of GCC 4.8, it has some stricter rules for compilation so I had to remove some flags like -Wall from the main Makefile so my compile would continue, furthermore I had to edit a Makefile in arch/arm/boot/compressed so that -Wa,-march=armv7-a instead of -march=all otherwise again I could not compile due to some errors.
After this I get a nice zImage, then I do fastboot boot zImage and my tablet hangs on the bootloader menu, nothing happens at all, I have to hold down power to fix it. Basically my kernel does NOT work in the least and I am unsure what the problem is. I am hoping somebody with experience here could help me.
The reason I posted in this subforum is because more devs would see it, however if Moderators are against it, please move the thread to the appropriate forum rather than deleting it, thank you!
dikidera said:
I tried compiling the original kernel I have running on my Nexus 7 2013.
So I did
that last checkout of commit ac9222cf61b2646a1862fb222365e52a0d1c498d is the one my Nexus 7 2013 Wi-Fi originally came with. Now since I used the prebuilt binaries of GCC 4.8, it has some stricter rules for compilation so I had to remove some flags like -Wall from the main Makefile so my compile would continue, furthermore I had to edit a Makefile in arch/arm/boot/compressed so that -Wa,-march=armv7-a instead of -march=all otherwise again I could not compile due to some errors.
After this I get a nice zImage, then I do fastboot boot zImage and my tablet hangs on the bootloader menu, nothing happens at all, I have to hold down power to fix it. Basically my kernel does NOT work in the least and I am unsure what the problem is. I am hoping somebody with experience here could help me.
The reason I posted in this subforum is because more devs would see it, however if Moderators are against it, please move the thread to the appropriate forum rather than deleting it, thank you!
Click to expand...
Click to collapse
Hi, I assume you're using kitkat branch for kitkat kernel?
You'll need these two commits to boot with a toolchain above GCC 4.7 regardless
https://github.com/poondog/kernel_msm/commit/c6f209b4ac195fbc19286ebe6d77bae939ac00b7
https://github.com/poondog/kernel_msm/commit/ea510c9b9dba084332ca88acee4a2064c9c80056
That will fix your zImage.
Is that by any chance related to this? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 Apparently 4.8 and a few other versions after 4.8 are affected.
dikidera said:
Is that by any chance related to this? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 Apparently 4.8 and a few other versions after 4.8 are affected.
Click to expand...
Click to collapse
Not sure, I haven't looked into it. But those patches seem to do the job fine
Hello!
I've compiled various ROMs from source without issue (well many issues and a lot of reading on this forum to troubleshoot). I am running Ubuntu 16.04.2 LTS and have always followed Android's Guide for installing the required build packages. The guide specifies running Ubuntu 14.04. I read on another website specifically for 16.04, and the recommended build packaged are different. Lastly, when reviewing LineageOS wiki for build packages, they have an even different list. The LineageOS guide did not actually work when I tried to install the build packages they listed.
Can anyone help clarify this? Is there a single source of truth for knowing which build packages are required for the version of Linux?
EDIT: So I somewhat answered my own question by looking into each package that was different from Android's Development webpage. But I still do not know how one would know which packages you'd need when working with various ROMs.