[Q] How to Build a Linux Kernel - Android Software/Hacking General [Developers Only]

I have been reading/doing some tablet/phone hacking (rooting, install new ROM with ADB etc). I've been always curious how the custom Kernel is built without the hardware manufacture support. Where do you get the drivers required to build a linux kernel for Xoom? For example, take XOOM. To install new Kernel, you would need the specific drivers for XOOM's WIFI, USB, DISPLAY, CAMERA, Audido etc. These drivers have specific information such as address/configuration etc which are not generic. So how do the Open-Source community obtain those drivers to build the Kernel?
I have been reading about the Android architecture, AOSP, Linux Kernel etc but can't find the answers. I'm an SoC hardware designer. I wrote some lower level drivers, API etc. but have never touch the kernel and above. I'm trying to move out of the hardware into the software space, so I'm looking at this from the bottom up approach.
Sorry if this is a wrong forum to ask this type of question.
Lance

Related

Darwin fort HTC Dream ?

Hello,
I have a little idea for My G1 :
Can I boot (and find) a DarwinARM Kernel for my G1 ?
I like run Debian on My G1, and I would like run Darwin.
Why Darwin?
I think is the same kernel on the iPhone OS, after the Hackintosh why not iPhoneOS on HTC ?
Thanks !
You definitely won't be able to boot on any *existing* BSD/Mach/Darwin ARM kernel due to certain customizations required. This would require porting several drivers over from the HTC kernel source, and at that, it wouldn't run as a *phone* since none of the HTC binaries would be compatible.
There are also many other parts of android that depend on a LINUX kernel. These could all be solved, but it would be a HUGE undertaking.
If you don't mind my asking, why would you want to? Getting a BSD kernel booting on the thing by itself doesn't offer any benefits, and you can be assured that there are closed source problems both in getting android running over a BSD kernel as well as for getting a more complete applephone OS running on HTC hardware.
Not to mention the near complete uselessness of applephoneOS...
And again... drivers, drivers, drivers. BIG problems here.
FukTheRegister said:
Hello,
I have a little idea for My G1 :
Can I boot (and find) a DarwinARM Kernel for my G1 ?
I like run Debian on My G1, and I would like run Darwin.
Why Darwin?
I think is the same kernel on the iPhone OS, after the Hackintosh why not iPhoneOS on HTC ?
Thanks !
Click to expand...
Click to collapse
FukTheRegister said:
Can I boot (and find) a DarwinARM Kernel for my G1 ?
I like run Debian on My G1, and I would like run Darwin.
Why Darwin?
I think is the same kernel on the iPhone OS, after the Hackintosh why not iPhoneOS on HTC ?
Click to expand...
Click to collapse
Actually, XNU is the kernel that Apple uses for Mac OS X, Darwin and iPhone OS. Darwin is merely the generic name of the OS X platform. It is Mach-based, and uses many BSD components. Its architecture is quite different from Linux.
Why in the world would you replace the kernel and the rest of the system with Darwin? There are no drivers for most of the hardware. Even those open-source drivers being developed by the Replicant project are Linux drivers, which are different from the drivers used in Darwin.
Furthermore, Android (well, specifically Dalvik) only runs on Linux, so you are sacrificing all of your phone functionality. Even if you get drivers for the hardware, you will only have a 528MHz Arm-based computer with a QVGA screen.

[Q] rewriting a hardware linux driver for android use

recently, i am doing a school project on a beagleboard which has android 2.2 ported.
I have to connect a sensor called phidgets 1056 to the board...
however, the drivers provider only got linux driver for the board.
Is it possible to rewrite the source code in the linux driver so that android can use them???
If it is..how can i make it????....I really need help now, so thanks

[Q] [linux - Ubuntu] chinese/unkn android rom dumping, kernel upgrade, rom flashing

Hello there,
I have a few questions and googling, gives me millions of results that are not helpful in regards to what I am looking for,
I have googled "rom dump android unknown devices" and etc etc and also looked at the kitchen thread but I am not quite satisfied with it, as it uses windows also linux is present there as well.
I am currently running eclipse with android SDK and also virtualisation is working fine, but my main question is.
What's the easies way to dump a rom of an unknown device, (can it be done in linux, or only windows?).
How can I inject some fancy code into the kernel for these unknown devices?
And what software can I use for flashing those unknown devices.
I have used the search button on here, have looked at android tablet zone and and android tablets.
But there are no helpful answers although plenty to read, but again simple how to dump a rom of a unknown device, customise kernel and then flash it again?
Thanks
Jay

[Q] Why is mobile OS installation flow not like PC OS installation flow

Hi everyone!
I have this question in mind for a long time now. It gets confirmed every time a company decides to make a new mobile OS. Why is it so damn difficult to first install a mobile OS, but even more, why only people with some special knowledge and dedication can port an OS to a new mobile device?
I mean, on a computer we just have to select if we want i386/x86 or AMD/x86_64 installer what ever computer brand or other hardware we do have while on mobile, we need to have a very specific image for our device. We end up with hundreds if not thousands of images of the same version of the OS.
So my question is, why don't we have this work flow to install a mobile OS:
- Flash a generic image on the device
- Run it
- Auto compile a new kernel on the device itself
- Load generic drivers
- If generic drivers don't work, download specific ones
- Continue with installing other regular software
Technical answers are welcomed.
Thanks,
Dragnucs.
Because.
Building the kernel on the device would take a lot of time and most phones do not have the resources to do so (memory and CPU).
Adding a development environment (compiler, libs, etc.) to the install image would make the install image quite large.
Most manufacturers release incomplete code for their drivers. This makes a complete re-creation of them from source nearly impossible.
There is no repository for 3rd party binary device drivers (probably not "legal" to do so). Mobile phones often have a proprietary system UI framework which is never released as source code. The best you can do is either re-create your own (AOSP, CM, AOKP) or borrow the one from the stock firmware release (Touchwiz, Sense).
If your phone needs a "special" network driver, how are you going to transfer one over during your install if you don't already have one. (classic chicken vs egg scenario)
It is much easier to setup one generic build (on a PC or server), then have custom compile scripts for each device you intend to support. Also a lot easier to debug build issues on a full computer than trying to do so on a phone.
In the PC world, you have manufacturer's that have to release binary drivers to Apple/Microsoft for validation and make binary or source drivers available for Linux. In the mobile world, those processes do not exist.
-Mike
Dragnucs said:
Hi everyone!
I have this question in mind for a long time now. It gets confirmed every time a company decides to make a new mobile OS. Why is it so damn difficult to first install a mobile OS, but even more, why only people with some special knowledge and dedication can port an OS to a new mobile device?
I mean, on a computer we just have to select if we want i386/x86 or AMD/x86_64 installer what ever computer brand or other hardware we do have while on mobile, we need to have a very specific image for our device. We end up with hundreds if not thousands of images of the same version of the OS.
So my question is, why don't we have this work flow to install a mobile OS:
- Flash a generic image on the device
- Run it
- Auto compile a new kernel on the device itself
- Load generic drivers
- If generic drivers don't work, download specific ones
- Continue with installing other regular software
Technical answers are welcomed.
Thanks,
Dragnucs.
Click to expand...
Click to collapse
Thanks buddy. :good:

[Q] How Android kernel and Virtual Machine work

Dear all,
I'm trying to reconstruct the Andriod on my phone. So far i managed to download source code for Linux core including files like "mount, cp, modprobe,...", however I notices thete are other files in /system/bin like "am, pm, ..." which control the other layer of Android OS. How can I download the source code for these kind of files. Also in framework we have "am.jar" which seems to have direct relation to Java VM. Maybe it is better to also ask how Java VM works on Android. I do not ask about general knowledge because more or less I know how it works. Basicly I need to know which files are related to the process of running Apps on Android and what they do.
Best wishes.

Categories

Resources