3

I successfully compiled and loaded custom Linux kernel into Android emulator (Eclair). Now I want to compile kernel for real Android device (Samsung Galaxy 5, Android 2.1 (Eclair)).

It seems that the same kernel image that was compiled for emulator, can't be used with real device. There is no much clear information given on how to do this.

Can someone tell what steps need to be changed to get kernel image for real android phone.

Olli
  • 1,231
  • 15
  • 31
Preetam
  • 5,528
  • 10
  • 32
  • 39

1 Answers1

4

You are probably using the MSM kernel tree (for Qualcomm MSM processors), but the Samsung Galaxy S has a Samsung Hummingbird processor and thus needs the Samsung kernel tree, found here.

I don't know if the kernel tree includes a defconfig for the Galaxy S specifically, but you could probably use the "herring_defconfig" (make herring_defconfig). Herring is the code name for the Nexus S, but the Galaxy S is quite similar.

If you are building the Android framework as well (not just the kernel), you'll likely need to extract binary drivers (for the camera, bluetooth, WiFi, radio, etc.) from the existing phone images and add them to your system build.

David B.
  • 5,700
  • 5
  • 31
  • 52
  • Thank you very much David. Actually, i want to enable full iptables(Netfilter) support in the kernel. Now the one which i have compiled for emulator works. At-least it blocks a URL. But i need to push iptables to /system/bin every time i start the emulator. I don't know if the same problem will persist with the phone. So i wanted /system/bin to contain iptables binary bydefault. – Preetam Apr 04 '11 at 10:27
  • I copied the iptables binary from ~/myandroid/out/target/product/generic/system/bin and loaded it into the emulator. And i have compiled kernel with full Netfilter and iptables support in the .config file. And the netfilter and iptables options are as likely as they are in the PC Linux with xtables. I have also enabled module loading support in the kernel config.. – Preetam Apr 04 '11 at 10:36
  • But when i try iptables-save, i get error saying iptables-save not found. iptables-save is a module that is loaded when needed(i think). So, how can i enable this. It seems that Android.mk file from ~/myandroid/external/iptables needs to be changed as the files iptables-save.c, iptables-restore.c they exists in the iptables folder but they have no entry in the makefile. What should i do to enable full iptables functionality both in emulator as well as on phone. – Preetam Apr 04 '11 at 10:45
  • This is really a different question. You should add it as a new question so that others with the same issue might recognize it by the title. But to give an answer, yes, it appears the default Android.mk makefile just builds the iptables binary, not the iptables-save or iptables-restore binaries. You'll need to add rules to the makefile for those. – David B. Apr 04 '11 at 17:19