HOWTO: Compile your own kernel from source (WIP)

Search This thread

itsmikeramsay

Senior Member
Mar 25, 2009
5,343
12,239
Atlanta
Hey folks,

Figured I would throw this out there for those who may want to know just what goes into compiling a kernel, and possibly, doing it themselves. This is a WIP, and is more about how to compile, than how to make changes to source or customize your own kernel.

Needed:


Linux. For this case, we will assume Ubuntu 10.10, 64 bit. This can be done with 32 bit as well, but you will need a different cross compiler.
Download | Ubuntu

dsixda's kitchen. So that we can easily split and repack kernels.
https://github.com/dsixda/Android-Kitchen/archives/master

Source. You can use mine. Its fairly heavily tweaked, and compiles without any modifcations.
https://github.com/adrynalyne/kernel_htc-mecha

A cross compiler toolchain. Because I use 64 bit linux, I use a 64 bit cross compiler.
http://rapidshare.com/files/394529815/HikaRi_toolchain_4.4.4.tbz2
(Credit adwinp from XDA)



Introduction

First, we install Ubuntu. I won't be going through that, however. So, assuming we have Ubuntu already installed, and working, we are ready to dive right in.

First, we need a tool Ubuntu does not install by default. This is called git. From a terminal:

Getting Source Code
sudo apt-get install git

Once git is installed, we can grab our source. Using a terminal:

[chaos@oblivion ~]$

code
Code:
mkdir android
cd android
mkdir kernels
cd kernels
git clone git://github.com/adrynalyne/kernel_htc-mecha.git

Depending on your connection, this could take a while.

This will create a kernel_htc-mecha directory under your /home/username/android/kernels folder.


Grabbing Toolchain
Now we will grab the toolchain. Download it, decompress it, and just leave it in the 4.4.4 directory. Move it to your android directory.

Grabbing and setting up the kitchen
Download the kitchen from the link given above, and decompress it. Rename it to kitchen. Move it to your android directory. Then from a terminal:

code
Code:
cd ~/android/kitchen
chmod 755 menu
./menu

This installs the kitchen and starts it up. Now the first thing we need to do is setup a working directory. Take a rom, any rom, and copy it to the ogiinal_update folder inside the kitchen. You can then setup your working folder.

Inside the working folder, delete boot.img. Grab, one of say, my kernels, and extract it. Take boot.img from the extracted contents and copy to the kitchen.

To split the initramfs (ramdisk) from the kernel, simply choose 0 from the menu, then 20. Hitting w will extract the kernel to a BOOT-EXTRACTED directory inside the kitchen (not working folder). Inside that folder, you will find the ramdisk and a zImage. The zImage is the kernel. We will stop there for now.

Compiling the kernel
First, we move to the kernel directory.

code
Code:
cd ~/android/kernels/kernel_htc-mecha

To compile the kernel, first we must have a configuration file ready. To do this:

code
Code:
make mecha-lte_defconfig

It will configure the system for compiling.

Now to compile the kernel:

code

Code:
make -j5 ARCH=arm CROSS_COMPILE=/home/username/android/4.4.4/bin/arm-none-eabi-


Where username is your, well, username and the number after j (thats a J) is the number of cpus +1.


Depending on the speed of your system. a zImage should be created within 3-30 minutes.


Packing the kernel

The zImage will be located under ~/android/kernels/kernel_htc-mecha/arch/arm/boot directory.

We will copy that zImage into the BOOT-EXTRACTED directory of the kitchen. Then, back at our menu for the kitchen, we hit 'b' to build the kernel. Within seconds, there is a new boot.img inside our Working folder. Now, remember my kernel package you downloaded? Well, time to kang the installer! The directory you unzipped contains a META-INF and system directory. You need both of those. Copy the boot.img in with those two folders.

So, our directory layout currently looks like so:
META-INF
system
boot.img


We need one more file, the wifi driver, from our compiled source.

Under ~/android/kernels/kernel_htc-mecha/drivers/net/wireless/bcm4329_204 you will find a file named bcm4329.ko. Copy this into system/lib of your new kernels installer directory.

Zip these three folders and give it a name. Now its ready to install.

A couple of things of note:

You almost always have to match the wifi driver with the kernel.

make clean mrproper will clean all the precompiled and temp fikes out of your source. This is recommended when making major source changes. Don't forget to remake your configuration after running it though.


Troubleshooting

There may be some files not found errors. Please be careful with these commands.

If the files not found are libcloog.so.0 and/or libmpfr.so.1, take a look below.

Code:
sudo ln -s /usr/lib/libcloog-debian.so.0 /usr/lib/libcloog.so.0
sudo ln -s /usr/lib/libmpfr.so.4 /usr/lib/libmpfr.so.1

This write-up/tutorial is excellent. Is there any way to learn how to do this on a Mac? Just got one and I'm trying to get into the development stages of Android...

Also Ubuntu 10.04 isn't there anymore, what about 11.04?
 

drod2169

Senior Member
Feb 19, 2010
224
106
Tampa, FL
For those that might want to build from my source as well, please do not use "mecha-kernel" from my github. its not functionable atm. transitions will lag, because BFS 363 does not play well with linux kernel 2.6.32.39.

Great write up adrynalyne :)
 

adam80460

Senior Member
Feb 28, 2010
54
26
I am using 32 bit version of Ubuntu 11.04 what would the correct Compiler toolchain to use? Ive done some searching and I am a little lost.
 

pablo1010

Member
Oct 25, 2010
42
6
I was wonder on how to decide the number after the j im using a xoom and i ran that line and lets just say in the end i got in a boot loop and i was wondering if it had to do with the number after the j any help is apperciated, thanks
 

tahahawa

Senior Member
Oct 14, 2010
1,064
313
It doesn't seem to want to compile. Source I'm trying to compile is: https://github.com/anryl/VF845kernelFroyo

Here's what I get:
Code:
scripts/kconfig/conf -s arch/arm/Kconfig
*
* Restart config...
*
*
* Configure standard kernel features (for small systems)
*
Configure standard kernel features (for small systems) (EMBEDDED) [Y/n/?] y
  Enable 16-bit UID system calls (UID16) [Y/n/?] (NEW) ^Cmake[2]: *** [silentoldconfig] Interrupt
make[1]: *** [silentoldconfig] Interrupt

taha@taha-Aspire-M5621:~/taha/android/kernels/VF845kernelFroyo$ make -j5 ARCH=arm CROSS_COMPILE=/home/taha/taha/android/4.4.4/bin/arm-none-eabi-
scripts/kconfig/conf -s arch/arm/Kconfig
*
* Restart config...
*
*
* Configure standard kernel features (for small systems)
*
Configure standard kernel features (for small systems) (EMBEDDED) [Y/n/?] y
  Enable 16-bit UID system calls (UID16) [Y/n/?] (NEW) 
  Sysctl syscall support (SYSCTL_SYSCALL) [Y/n/?] y
  Load all symbols for debugging/ksymoops (KALLSYMS) [Y/n/?] y
    Include all symbols in kallsyms (KALLSYMS_ALL) [Y/n/?] y
    Do an extra kallsyms pass (KALLSYMS_EXTRA_PASS) [N/y/?] n
  Support for hot-pluggable devices (HOTPLUG) [Y/n/?] y
  Enable support for printk (PRINTK) [Y/n/?] y
  BUG() support (BUG) [Y/n/?] y
  Enable ELF core dumps (ELF_CORE) [Y/n/?] y
  Enable full-sized data structures for core (BASE_FULL) [Y/n/?] y
  Enable futex support (FUTEX) [Y/n/?] y
  Enable eventpoll support (EPOLL) [Y/n/?] y
  Enable signalfd() system call (SIGNALFD) [Y/n/?] y
  Enable timerfd() system call (TIMERFD) [Y/n/?] y
  Enable eventfd() system call (EVENTFD) [Y/n/?] y
  Use full shmem filesystem (SHMEM) [Y/n/?] y
*
* Enable the block layer
*
Enable the block layer (BLOCK) [Y/n/?] y
  Support for large (2TB+) block devices and files (LBDAF) [Y/n/?] (NEW) 
  Block layer SG support v4 (BLK_DEV_BSG) [Y/n/?] y
  Block layer data integrity support (BLK_DEV_INTEGRITY) [Y/n/?] y
*
* System Type
*
MMU-based Paged Memory Management Support (MMU) [Y/n/?] y
ARM system type
  1. Agilent AAEC-2000 based (ARCH_AAEC2000) (NEW)
  2. ARM Ltd. Integrator family (ARCH_INTEGRATOR) (NEW)
  3. ARM Ltd. RealView family (ARCH_REALVIEW) (NEW)
> 4. ARM Ltd. Versatile family (ARCH_VERSATILE) (NEW)
  5. Atmel AT91 (ARCH_AT91) (NEW)
  6. Cirrus Logic CLPS711x/EP721x-based (ARCH_CLPS711X) (NEW)
  7. Cortina Systems Gemini (ARCH_GEMINI) (NEW)
  8. EBSA-110 (ARCH_EBSA110) (NEW)
  9. EP93xx-based (ARCH_EP93XX) (NEW)
  10. FootBridge (ARCH_FOOTBRIDGE) (NEW)
  11. Freescale MXC/iMX-based (ARCH_MXC) (NEW)
  12. Freescale STMP3xxx (ARCH_STMP3XXX) (NEW)
  13. Hilscher NetX based (ARCH_NETX) (NEW)
  14. Hynix HMS720x-based (ARCH_H720X) (NEW)
  15. STMicroelectronics Nomadik (ARCH_NOMADIK) (NEW)
  16. IOP13xx-based (ARCH_IOP13XX) (NEW)
  17. IOP32x-based (ARCH_IOP32X) (NEW)
  18. IOP33x-based (ARCH_IOP33X) (NEW)
  19. IXP23XX-based (ARCH_IXP23XX) (NEW)
  20. IXP2400/2800-based (ARCH_IXP2000) (NEW)
  21. IXP4xx-based (ARCH_IXP4XX) (NEW)
  22. LinkUp-L7200 (ARCH_L7200) (NEW)
  23. Marvell Kirkwood (ARCH_KIRKWOOD) (NEW)
  24. Marvell Loki (88RC8480) (ARCH_LOKI) (NEW)
  25. Marvell MV78xx0 (ARCH_MV78XX0) (NEW)
  26. Marvell Orion (ARCH_ORION5X) (NEW)
  27. Marvell PXA168/910 (ARCH_MMP) (NEW)
  28. Micrel/Kendin KS8695 (ARCH_KS8695) (NEW)
  29. NetSilicon NS9xxx (ARCH_NS9XXX) (NEW)
  30. Nuvoton W90X900 CPU (ARCH_W90X900) (NEW)
  31. Philips Nexperia PNX4008 Mobile (ARCH_PNX4008) (NEW)
  32. PXA2xx/PXA3xx-based (ARCH_PXA) (NEW)
  33. Qualcomm MSM/QSD (ARCH_MSM) (NEW)
  34. RiscPC (ARCH_RPC) (NEW)
  35. SA1100-based (ARCH_SA1100) (NEW)
  36. Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443 (ARCH_S3C2410) (NEW)
  37. Samsung S3C64XX (ARCH_S3C64XX) (NEW)
  38. Samsung S5PC1XX (ARCH_S5PC1XX) (NEW)
  39. Shark (ARCH_SHARK) (NEW)
  40. Sharp LH7A40X (ARCH_LH7A40X) (NEW)
  41. ST-Ericsson U300 Series (ARCH_U300) (NEW)
  42. TI DaVinci (ARCH_DAVINCI) (NEW)
  43. TI OMAP (ARCH_OMAP) (NEW)
  44. Broadcom BCMRING (ARCH_BCMRING) (NEW)
choice[1-44]: 
*
* Versatile platform type
*
Support Versatile/PB platform (ARCH_VERSATILE_PB) [Y/n/?] (NEW) 
Support Versatile/AB platform (MACH_VERSATILE_AB) [N/y/?] (NEW) 
*
* Processor Type
*
*
* Processor Features
*
Support Thumb user binaries (ARM_THUMB) [Y/n/?] (NEW) 
Disable I-Cache (I-bit) (CPU_ICACHE_DISABLE) [N/y/?] (NEW) 
Disable D-Cache (C-bit) (CPU_DCACHE_DISABLE) [N/y/?] (NEW) 
Force write through D-cache (CPU_DCACHE_WRITETHROUGH) [N/y/?] (NEW) 
Round robin I and D cache replacement algorithm (CPU_CACHE_ROUND_ROBIN) [N/y/?] (NEW) 
Virtual Contiguous Memory (VCM) Layer (VCM) [N/y/?] (NEW) 
*
* Kernel Features
*
Tickless System (Dynamic Ticks) (NO_HZ) [Y/n/?] y
High Resolution Timer Support (HIGH_RES_TIMERS) [Y/n/?] y
Memory split
> 1. 3G/1G user/kernel split (VMSPLIT_3G) (NEW)
  2. 2G/2G user/kernel split (VMSPLIT_2G) (NEW)
  3. 1G/3G user/kernel split (VMSPLIT_1G) (NEW)
choice[1-3?]: 
Preemption Model
  1. No Forced Preemption (Server) (PREEMPT_NONE)
  2. Voluntary Kernel Preemption (Desktop) (PREEMPT_VOLUNTARY)
> 3. Preemptible Kernel (Low-Latency Desktop) (PREEMPT)
choice[1-3]: 3
Use the ARM EABI to compile the kernel (AEABI) [N/y/?] (NEW) 
Memory map has holes ending within MAX_ORDER_NR_PAGES (HOLES_IN_ZONE) [N/y/?] (NEW) 
High Memory Support (EXPERIMENTAL) (HIGHMEM) [N/y/?] (NEW) 
Reserved vmalloc space (VMALLOC_RESERVE) [0x08000000] (NEW) 
Memory model
> 1. Flat Memory (FLATMEM_MANUAL)
choice[1]: 1
Enable KSM for page merging (KSM) [N/y/?] n
Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [4096] 4096
Timer and CPU usage LEDs (LEDS) [N/y/?] (NEW) 
Use kernel mem{cpy,set}() for {copy_to,clear}_user() (EXPERIMENTAL) (UACCESS_WITH_MEMCPY) [N/y/?] (NEW) 
*
* Boot options
*
Compressed ROM boot loader base address (ZBOOT_ROM_TEXT) [0] (NEW) 
Compressed ROM boot loader BSS address (ZBOOT_ROM_BSS) [0] (NEW) 
Default kernel command string (CMDLINE) [init=/sbin/init root=/dev/ram rw initrd=0x11000000,16M console=ttyDCC0 mem=88M] init=/sbin/init root=/dev/ram rw initrd=0x11000000,16M console=ttyDCC0 mem=88M
Kernel Execute-In-Place from ROM (XIP_KERNEL) [N/y/?] (NEW) 
Kexec system call (EXPERIMENTAL) (KEXEC) [N/y/?] n
*
* Floating point emulation
*
*
* At least one emulation must be selected
*
NWFPE math emulation (FPE_NWFPE) [N/y/?] (NEW) 
FastFPE math emulation (EXPERIMENTAL) (FPE_FASTFPE) [N/y/?] (NEW) 
VFP-format floating point maths (VFP) [N/y/?] (NEW) 
*
* Userspace binary formats
*
Kernel support for ELF binaries (BINFMT_ELF) [Y/n/?] y
Write ELF core dumps with partial segments (CORE_DUMP_DEFAULT_ELF_HEADERS) [N/y/?] n
Kernel support for a.out and ECOFF binaries (BINFMT_AOUT) [N/m/y/?] (NEW) 
Kernel support for MISC binaries (BINFMT_MISC) [N/m/y/?] n
RISC OS personality (ARTHUR) [N/m/y/?] (NEW) 
*
* Power management options
*
Power Management support (PM) [Y/n/?] y
  Power Management Debug Support (PM_DEBUG) [N/y/?] n
Suspend to RAM and standby (SUSPEND) [Y/n/?] y
Wake lock (WAKELOCK) [Y/n/?] y
  Wake lock stats (WAKELOCK_STAT) [Y/n/?] y
  Userspace wake locks (USER_WAKELOCK) [Y/n/?] y
  Early suspend (EARLYSUSPEND) [Y/n/?] y
User-space screen access
  1. None (NO_USER_SPACE_SCREEN_ACCESS_CONTROL)
> 2. Console switch on early-suspend (CONSOLE_EARLYSUSPEND)
  3. Sysfs interface (FB_EARLYSUSPEND)
choice[1-3]: 2
Advanced Power Management Emulation (APM_EMULATION) [N/m/y/?] (NEW) 
Run-time PM core functionality (PM_RUNTIME) [N/y/?] n
*
* Network packet filtering framework (Netfilter)
*
Network packet filtering framework (Netfilter) (NETFILTER) [Y/n/?] y
  Network packet filtering debugging (NETFILTER_DEBUG) [N/y/?] (NEW) 
  Advanced netfilter configuration (NETFILTER_ADVANCED) [Y/n/?] y
*
* Memory Technology Device (MTD) support
*
Memory Technology Device (MTD) support (MTD) [Y/n/m/?] y
  Debugging (MTD_DEBUG) [N/y/?] n
  MTD tests support (MTD_TESTS) [M/n/?] m
  MTD concatenating support (MTD_CONCAT) [N/m/y/?] n
  MTD partitioning support (MTD_PARTITIONS) [Y/n/?] y
    MTD Lazy ECC Stats collection support (MTD_LAZYECCSTATS) [N/y/?] n
    RedBoot partition table parsing (MTD_REDBOOT_PARTS) [N/m/y/?] n
    Command line partition table parsing (MTD_CMDLINE_PARTS) [Y/n/?] y
    ARM Firmware Suite partition parsing (MTD_AFS_PARTS) [N/m/y/?] (NEW) 
    TI AR7 partitioning support (MTD_AR7_PARTS) [N/m/y/?] n
  *
  * User Modules And Translation Layers
  *
  Direct char device access to MTD devices (MTD_CHAR) [Y/n/m/?] y
  Common interface to block layer for MTD 'translation layers' (MTD_BLKDEVS) [Y] y
  Caching block device access to MTD devices (MTD_BLOCK) [Y/n/m/?] y
  FTL (Flash Translation Layer) support (FTL) [N/m/y/?] n
  NFTL (NAND Flash Translation Layer) support (NFTL) [N/m/y/?] n
  INFTL (Inverse NAND Flash Translation Layer) support (INFTL) [N/m/y/?] n
  Resident Flash Disk (Flash Translation Layer) support (RFD_FTL) [N/m/y/?] n
  NAND SSFDC (SmartMedia) read only translation layer (SSFDC) [N/m/y/?] n
  Log panic/oops to an MTD buffer (MTD_OOPS) [N/m/y/?] n
  Include chip ids for known NAND devices. (MTD_NAND_IDS) [Y/n/m/?] y
*
* Touchscreens
*
Touchscreens (INPUT_TOUCHSCREEN) [Y/n/?] y
  AD7879 based touchscreens: AD7879-1 I2C Interface (TOUCHSCREEN_AD7879_I2C) [N/m/y/?] n
  Support for Cypress TMC i2c touchscreen (TOUCHSCREEN_CYPRESS_TMG) [N/m/y/?] n
  EETI touchscreen panel support (TOUCHSCREEN_EETI) [N/m/y/?] n
  Fujitsu serial touchscreen (TOUCHSCREEN_FUJITSU) [N/m/y/?] n
  Gunze AHL-51S touchscreen (TOUCHSCREEN_GUNZE) [N/m/y/?] n
  Elan 8232 I2C touchscreen (TOUCHSCREEN_ELAN_I2C_8232) [N/m/y] n
  Elo serial touchscreens (TOUCHSCREEN_ELO) [N/m/y/?] n
  Wacom W8001 penabled serial touchscreen (TOUCHSCREEN_WACOM_W8001) [N/m/y/?] n
  MELFAS MCS-5000 touchscreen (TOUCHSCREEN_MCS5000) [N/m/y/?] n
  MicroTouch serial touchscreens (TOUCHSCREEN_MTOUCH) [N/m/y/?] n
  iNexio serial touchscreens (TOUCHSCREEN_INEXIO) [N/m/y/?] n
  ICS MicroClock MK712 touchscreen (TOUCHSCREEN_MK712) [N/m/y/?] n
  Penmount serial touchscreen (TOUCHSCREEN_PENMOUNT) [N/m/y/?] n
  Synaptics i2c touchscreen (TOUCHSCREEN_SYNAPTICS_I2C_RMI) [N/m/y/?] n
  Touchright serial touchscreen (TOUCHSCREEN_TOUCHRIGHT) [N/m/y/?] n
  Touchwin serial touchscreen (TOUCHSCREEN_TOUCHWIN) [N/m/y/?] n
  USB Touchscreen Driver (TOUCHSCREEN_USB_COMPOSITE) [N/m/y/?] n
  Sahara TouchIT-213 touchscreen (TOUCHSCREEN_TOUCHIT213) [N/m/y/?] n
  TSC2007 based touchscreens (TOUCHSCREEN_TSC2007) [N/m/y/?] n
  W90P910 touchscreen driver (TOUCHSCREEN_W90X900) [N/m/y/?] (NEW) 
  Cypress TMA300-TMG200 based touchscreens (TOUCHSCREEN_CY8C_TS) [N/m/y/?] n
  CYPRESS_CPT Touchscreen (TOUCHSCREEN_CYPRESS_CPT) [N/m/y/?] n
  synaptics_i2c_rmi Touchscreen (TOUCHSCREEN_SYNAPTICS_I2C_RMI_TM1319) [N/m/y/?] n
  Cypress Touchscreen (TOUCHSCREEN_CYPRESS) [N/m/y/?] n
  Melfas Touchscreen (TOUCHSCREEN_MELFAS) [N/m/y/?] n
*
* Hardware I/O ports
*
Serial I/O support (SERIO) [Y/?] y
  Serial port line discipline (SERIO_SERPORT) [Y/n/m/?] y
  AMBA KMI keyboard controller (SERIO_AMBAKMI) [N/m/y] (NEW) 
  PCI PS/2 keyboard and PS/2 mouse controller (SERIO_PCIPS2) [N/m/y/?] n
  PS/2 driver library (SERIO_LIBPS2) [Y/?] y
  Raw access to serio ports (SERIO_RAW) [N/m/y/?] n
Gameport support (GAMEPORT) [N/m/y/?] n
*
* Serial drivers
*
8250/16550 and compatible serial support (SERIAL_8250) [N/m/y/?] n
*
* Non-8250 serial port support
*
ARM AMBA PL011 serial port support (SERIAL_AMBA_PL011) [N/m/y/?] (NEW) 
Digi International NEO PCI Support (SERIAL_JSM) [N/m/y/?] n
*
* Character devices
*
Virtual terminal (VT) [Y/n/?] y
  Enable character translations in console (CONSOLE_TRANSLATIONS) [Y/n/?] y
  Support for console on virtual terminal (VT_CONSOLE) [Y/n/?] y
  Support for binding and unbinding console drivers (VT_HW_CONSOLE_BINDING) [N/y/?] n
Memory device driver (DEVMEM) [Y/n/?] y
/dev/kmem virtual device support (DEVKMEM) [Y/n/?] y
Non-standard serial port support (SERIAL_NONSTANDARD) [N/y/?] n
HSDPA Broadband Wireless Data Card - Globe Trotter (NOZOMI) [N/m/y/?] n
Unix98 PTY support (UNIX98_PTYS) [Y/n/?] y
  Support multiple instances of devpts (DEVPTS_MULTIPLE_INSTANCES) [N/y/?] n
Legacy (BSD) PTY support (LEGACY_PTYS) [N/y/?] n
Hardware Random Number Generator Core support (HW_RANDOM) [N/m/y/?] n
Siemens R3964 line discipline (R3964) [N/m/y/?] n
Applicom intelligent fieldbus card support (APPLICOM) [N/m/y/?] n
RAW driver (/dev/raw/rawN) (RAW_DRIVER) [N/m/y/?] n
DCC tty driver (DCC_TTY) [N/m/y] (NEW) 
*
* I2C Hardware Bus support
*
*
* PC SMBus host controller drivers
*
ALI 1535 (I2C_ALI1535) [N/m/y/?] n
ALI 1563 (I2C_ALI1563) [N/m/y/?] n
ALI 15x3 (I2C_ALI15X3) [N/m/y/?] n
AMD 756/766/768/8111 and nVidia nForce (I2C_AMD756) [N/m/y/?] n
AMD 8111 (I2C_AMD8111) [N/m/y/?] n
Intel 82801 (ICH) (I2C_I801) [N/m/y/?] n
Intel SCH SMBus 1.0 (I2C_ISCH) [N/m/y/?] n
Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC) (I2C_PIIX4) [N/m/y/?] n
Nvidia nForce2, nForce3 and nForce4 (I2C_NFORCE2) [N/m/y/?] n
SiS 5595 (I2C_SIS5595) [N/m/y/?] n
SiS 630/730 (I2C_SIS630) [N/m/y/?] n
SiS 96x (I2C_SIS96X) [N/m/y/?] n
VIA VT82C586B (I2C_VIA) [N/m/y/?] n
VIA VT82C596/82C686/82xx and CX700/VX8xx (I2C_VIAPRO) [N/m/y/?] n
*
* I2C system bus drivers (mostly embedded / system-on-chip)
*
Synopsys DesignWare (I2C_DESIGNWARE) [N/m/y/?] (NEW) 
OpenCores I2C Controller (I2C_OCORES) [N/m/y/?] n
Simtec Generic I2C interface (I2C_SIMTEC) [N/m/y/?] n
ARM Versatile/Realview I2C bus support (I2C_VERSATILE) [N/m/y/?] (NEW) 
*
* External I2C/SMBus adapter drivers
*
Parallel port adapter (light) (I2C_PARPORT_LIGHT) [N/m/y/?] n
TAOS evaluation module (I2C_TAOS_EVM) [N/m/y/?] n
Tiny-USB adapter (I2C_TINY_USB) [N/m/y/?] n
*
* Graphics adapter I2C/DDC channel drivers
*
Voodoo 3 (DEPRECATED) (I2C_VOODOO3) [N/m/y/?] n
*
* Other I2C/SMBus bus drivers
*
PCA9564/PCA9665 as platform device (I2C_PCA_PLATFORM) [N/m/y/?] n
I2C/SMBus Test Stub (I2C_STUB) [N/m/?] n
*
* Multifunction device drivers
*
Support for Silicon Motion SM501 (MFD_SM501) [N/m/y/?] n
HTC PASIC3 LED/DS1WM chip support (HTC_PASIC3) [N/m/y/?] n
Texas Instruments TWL4030/TPS659x0 Support (TWL4030_CORE) [N/y/?] n
Support Toshiba T7L66XB (MFD_T7L66XB) [N/y/?] (NEW) 
Support Toshiba TC6387XB (MFD_TC6387XB) [N/y/?] (NEW) 
Dialog Semiconductor DA9030/DA9034 PMIC Support (PMIC_DA903X) [N/y/?] n
Support Wolfson Microelectronics WM8400 (MFD_WM8400) [N/m/y/?] n
Support Wolfson Microelectronics WM831x PMICs (MFD_WM831X) [N/m/y/?] n
Support Wolfson Microelectronics WM8350 with I2C (MFD_WM8350_I2C) [N/m/y/?] n
Support for NXP PCF50633 (MFD_PCF50633) [N/m/y/?] n
ST-Ericsson AB3100 Mixed Signal Circuit core functions (AB3100_CORE) [N/m/y/?] n
*
* Support for frame buffer devices
*
Support for frame buffer devices (FB) [Y/n/m/?] y
  Enable firmware EDID (FIRMWARE_EDID) [N/y/?] n
  Enable Video Mode Handling Helpers (FB_MODE_HELPERS) [N/y/?] n
  Enable Tile Blitting Support (FB_TILEBLITTING) [N/y/?] n
  *
  * Frame buffer hardware drivers
  *
  Cirrus Logic support (FB_CIRRUS) [N/m/y/?] n
  Permedia2 support (FB_PM2) [N/m/y/?] n
  ARM PrimeCell PL110 support (FB_ARMCLCD) [N/m/y/?] (NEW) 
  CyberPro 2000/2010/5000 support (FB_CYBER2000) [N/m/y/?] n
  Asiliant (Chips) 69000 display support (FB_ASILIANT) [N/y/?] n
  IMS Twin Turbo display support (FB_IMSTT) [N/y/?] n
  Epson S1D13XXX framebuffer support (FB_S1D13XXX) [N/m/y/?] n
  nVidia Framebuffer Support (FB_NVIDIA) [N/m/y/?] n
  nVidia Riva support (FB_RIVA) [N/m/y/?] n
  Matrox acceleration (FB_MATROX) [N/m/y/?] n
  ATI Radeon display support (FB_RADEON) [N/m/y/?] n
  ATI Rage128 display support (FB_ATY128) [N/m/y/?] n
  ATI Mach64 display support (FB_ATY) [N/m/y/?] n
  S3 Trio/Virge support (FB_S3) [N/m/y/?] n
  S3 Savage support (FB_SAVAGE) [N/m/y/?] n
  SiS/XGI display support (FB_SIS) [N/m/y/?] n
  VIA UniChrome (Pro) and Chrome9 display support (FB_VIA) [N/m/y/?] n
  NeoMagic display support (FB_NEOMAGIC) [N/m/y/?] n
  IMG Kyro support (FB_KYRO) [N/m/y/?] n
  3Dfx Banshee/Voodoo3/Voodoo5 display support (FB_3DFX) [N/m/y/?] n
  3Dfx Voodoo Graphics (sst1) support (FB_VOODOO1) [N/m/y/?] n
  VIA VT8623 support (FB_VT8623) [N/m/y/?] n
  Trident/CyberXXX/CyberBlade support (FB_TRIDENT) [N/m/y/?] n
  ARK 2000PV support (FB_ARK) [N/m/y/?] n
  Permedia3 support (EXPERIMENTAL) (FB_PM3) [N/m/y/?] n
  Fujitsu carmine frame buffer support (FB_CARMINE) [N/m/y/?] n
  Virtual Frame Buffer support (ONLY FOR TESTING!) (FB_VIRTUAL) [N/m/y/?] n
  E-Ink Metronome/8track controller support (FB_METRONOME) [N/m/y/?] n
  Fujitsu MB862xx GDC support (FB_MB862XX) [N/m/y/?] n
  E-Ink Broadsheet/Epson S1D13521 controller support (FB_BROADSHEET) [N/m/y/?] n
*
* ARM sound devices
*
ARM sound devices (SND_ARM) [Y/n/?] (NEW) 
  ARM PrimeCell PL041 AC Link support (SND_ARMAACI) [N/m/y] (NEW) 
*
* USB support
*
USB support (USB_SUPPORT) [Y/n/?] y
  Support for Host-side USB (USB) [Y/?] y
    USB verbose debug messages (USB_DEBUG) [N/y/?] n
    USB announce new devices (USB_ANNOUNCE_NEW_DEVICES) [N/y/?] n
    *
    * Miscellaneous USB options
    *
    USB device filesystem (DEPRECATED) (USB_DEVICEFS) [N/y/?] n
    USB device class-devices (DEPRECATED) (USB_DEVICE_CLASS) [Y/n/?] y
    Dynamic USB minor allocation (USB_DYNAMIC_MINORS) [N/y/?] n
    USB selective suspend/resume and wakeup (USB_SUSPEND) [N/y/?] n
    Rely on OTG Targeted Peripherals List (USB_OTG_WHITELIST) [N/y/?] n
    Disable external hubs (USB_OTG_BLACKLIST_HUB) [N/y/?] n
    USB Monitor (USB_MON) [N/m/y/?] n
    Enable Wireless USB extensions (EXPERIMENTAL) (USB_WUSB) [N/m/y/?] n
    Support WUSB Cable Based Association (CBA) (USB_WUSB_CBAF) [N/m/y/?] n
    *
    * USB Host Controller Drivers
    *
    Cypress C67x00 HCD support (USB_C67X00_HCD) [N/m/y/?] n
    xHCI HCD (USB 3.0) support (EXPERIMENTAL) (USB_XHCI_HCD) [N/m/y/?] n
    EHCI HCD (USB 2.0) support (USB_EHCI_HCD) [N/m/y/?] n
    OXU210HP HCD support (USB_OXU210HP_HCD) [N/m/y/?] n
  ISP116X HCD support (USB_ISP116X_HCD) [N/m/y/?] n
  ISP 1760 HCD support (USB_ISP1760_HCD) [N/m/y/?] n
  ISP1362 HCD support (USB_ISP1362_HCD) [N/m/y/?] n
  OHCI HCD support (USB_OHCI_HCD) [N/m/y/?] n
  UHCI HCD (most Intel and VIA) support (USB_UHCI_HCD) [N/m/y/?] n
  SL811HS HCD support (USB_SL811_HCD) [N/m/y/?] n
  R8A66597 HCD support (USB_R8A66597_HCD) [N/m/y/?] n
  Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL) (USB_WHCI_HCD) [N/m/y/?] n
  Host Wire Adapter (HWA) driver (EXPERIMENTAL) (USB_HWA_HCD) [N/m/y/?] n
  Inventra Highspeed Dual Role Controller (TI, ADI, ...) (USB_MUSB_HDRC) [N/m/y/?] (NEW) 
  *
  * USB Device Class drivers
  *
  USB Modem (CDC ACM) support (USB_ACM) [N/m/y/?] n
  USB Printer support (USB_PRINTER) [N/m/y/?] n
  USB Wireless Device Management support (USB_WDM) [N/m/y/?] n
  USB Test and Measurement Class support (USB_TMC) [N/m/y/?] n
  *
  * NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
  *
  *
  * also be needed; see USB_STORAGE Help for more info
  *
  The shared table of common (or usual) storage devices (USB_LIBUSUAL) [N/y/?] n
  *
  * USB Imaging devices
  *
  USB Mustek MDC800 Digital Camera support (USB_MDC800) [N/m/y/?] n
  *
  * USB port drivers
  *
  *
  * USB Miscellaneous drivers
  *
  EMI 6|2m USB Audio interface support (USB_EMI62) [N/m/y/?] n
  EMI 2|6 USB Audio interface support (USB_EMI26) [N/m/y/?] n
  ADU devices from Ontrak Control Systems (USB_ADUTUX) [N/m/y/?] n
  USB 7-Segment LED Display (USB_SEVSEG) [N/m/y/?] n
  USB Diamond Rio500 support (USB_RIO500) [N/m/y/?] n
  USB Lego Infrared Tower support (USB_LEGOTOWER) [N/m/y/?] n
  USB LCD driver support (USB_LCD) [N/m/y/?] n
  USB BlackBerry recharge support (USB_BERRY_CHARGE) [N/m/y/?] n
  USB LED driver support (USB_LED) [N/m/y/?] n
  Cypress CY7C63xxx USB driver support (USB_CYPRESS_CY7C63) [N/m/y/?] n
  Cypress USB thermometer driver support (USB_CYTHERM) [N/m/y/?] n
  Siemens ID USB Mouse Fingerprint sensor support (USB_IDMOUSE) [N/m/y/?] n
  Elan PCMCIA CardBus Adapter USB Client (USB_FTDI_ELAN) [N/m/y/?] n
  Apple Cinema Display support (USB_APPLEDISPLAY) [N/m/y/?] n
  USB LD driver (USB_LD) [N/m/y/?] n
  PlayStation 2 Trance Vibrator driver support (USB_TRANCEVIBRATOR) [N/m/y/?] n
  IO Warrior driver support (USB_IOWARRIOR) [N/m/y/?] n
  USB testing driver (USB_TEST) [N/m/y/?] n
  iSight firmware loading support (USB_ISIGHTFW) [N/m/y/?] n
  USB VST driver (USB_VST) [N/m/y/?] n
  *
  * OTG and related infrastructure
  *
  NOP USB Transceiver Driver (NOP_USB_XCEIV) [N/m/y/?] n
*
* Device Drivers
*
Wireless extensions sdcc files (HUAWEI_WIFI_SDCC) [Y/n] y
Allow unsafe resume (DANGEROUS) (MMC_UNSAFE_RESUME) [Y/n/?] y
MMC embedded SDIO device support (EXPERIMENTAL) (MMC_EMBEDDED_SDIO) [N/y/?] n
Enable paranoid SD card initialization (EXPERIMENTAL) (MMC_PARANOID_SD_INIT) [Y/n/?] y
*
* MMC/SD/SDIO Card Drivers
*
MMC block device driver (MMC_BLOCK) [Y/n/m/?] y
  Use bounce buffer for simple hosts (MMC_BLOCK_BOUNCE) [N/y/?] n
  Deferr MMC layer resume until I/O is requested (MMC_BLOCK_DEFERRED_RESUME) [N/y/?] n
SDIO UART/GPS class support (SDIO_UART) [N/m/y/?] n
MMC host test driver (MMC_TEST) [N/m/y/?] n
*
* MMC/SD/SDIO Host Controller Drivers
*
ARM AMBA Multimedia Card Interface support (MMC_ARMMMCI) [N/m/y/?] (NEW) 
Secure Digital Host Controller Interface support (MMC_SDHCI) [N/m/y/?] n
Atmel SD/MMC Driver [M/y/?] m
TI Flash Media MMC/SD Interface support  (EXPERIMENTAL) (MMC_TIFM_SD) [N/m/y/?] n
ENE CB710 MMC/SD Interface support (MMC_CB710) [N/m/y/?] n
VIA SD/MMC Card Reader Driver (MMC_VIA_SDMMC) [N/m/y/?] n
*
* Real Time Clock
*
Real Time Clock (RTC_CLASS) [Y/n/m/?] y
  Set system time from RTC on startup and resume (RTC_HCTOSYS) [Y/n/?] y
    RTC used to set the system time (RTC_HCTOSYS_DEVICE) [rtc0] rtc0
  RTC debug support (RTC_DEBUG) [N/y/?] n
  *
  * RTC interfaces
  *
  /sys/class/rtc/rtcN (sysfs) (RTC_INTF_SYSFS) [Y/n/?] y
  /proc/driver/rtc (procfs for rtc0) (RTC_INTF_PROC) [Y/n/?] y
  /dev/rtcN (character devices) (RTC_INTF_DEV) [Y/n/?] y
    RTC UIE emulation on dev interface (RTC_INTF_DEV_UIE_EMUL) [N/y/?] n
  Android alarm driver (RTC_INTF_ALARM) [Y/n/?] y
    Android alarm device (RTC_INTF_ALARM_DEV) [Y/n/?] y
  Test driver/device (RTC_DRV_TEST) [N/m/y/?] n
  *
  * I2C RTC drivers
  *
  Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025 (RTC_DRV_DS1307) [N/m/y/?] n
  Dallas/Maxim DS1374 (RTC_DRV_DS1374) [N/m/y/?] n
  Dallas/Maxim DS1672 (RTC_DRV_DS1672) [N/m/y/?] n
  Maxim MAX6900 (RTC_DRV_MAX6900) [N/m/y/?] n
  Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A (RTC_DRV_RS5C372) [N/m/y/?] n
  Intersil ISL1208 (RTC_DRV_ISL1208) [N/m/y/?] n
  Xicor/Intersil X1205 (RTC_DRV_X1205) [N/m/y/?] n
  Philips PCF8563/Epson RTC8564 (RTC_DRV_PCF8563) [N/m/y/?] n
  Philips PCF8583 (RTC_DRV_PCF8583) [N/m/y/?] n
  ST M41T62/65/M41T80/81/82/83/84/85/87 (RTC_DRV_M41T80) [N/m/y/?] n
  Seiko Instruments S-35390A (RTC_DRV_S35390A) [N/m/y/?] n
  Ramtron FM3130 (RTC_DRV_FM3130) [N/m/y/?] n
  Epson RX-8581 (RTC_DRV_RX8581) [N/m/y/?] n
  Epson RX-8025SA/NB (RTC_DRV_RX8025) [N/m/y/?] n
  *
  * SPI RTC drivers
  *
  *
  * Platform RTC drivers
  *
  PC-style 'CMOS' (RTC_DRV_CMOS) [N/m/y/?] n
  Dallas DS1286 (RTC_DRV_DS1286) [N/m/y/?] n
  Dallas DS1511 (RTC_DRV_DS1511) [N/m/y/?] n
  Maxim/Dallas DS1553 (RTC_DRV_DS1553) [N/m/y/?] n
  Maxim/Dallas DS1742/1743 (RTC_DRV_DS1742) [N/m/y/?] n
  Simtek STK17TA8 (RTC_DRV_STK17TA8) [N/m/y/?] n
  ST M48T86/Dallas DS12887 (RTC_DRV_M48T86) [N/m/y/?] n
  ST M48T35 (RTC_DRV_M48T35) [N/m/y/?] n
  ST M48T59/M48T08/M48T02 (RTC_DRV_M48T59) [N/m/y/?] n
  TI BQ4802 (RTC_DRV_BQ4802) [N/m/y/?] n
  EM Microelectronic V3020 (RTC_DRV_V3020) [N/m/y/?] n
  *
  * on-CPU RTC drivers
  *
  ARM AMBA PL030 RTC (RTC_DRV_PL030) [N/m/y/?] (NEW) 
  ARM AMBA PL031 RTC (RTC_DRV_PL031) [N/m/y/?] (NEW) 
*
* Kernel hacking
*
Show timing information on printks (PRINTK_TIME) [Y/n/?] y
Enable __deprecated logic (ENABLE_WARN_DEPRECATED) [Y/n/?] y
Enable __must_check logic (ENABLE_MUST_CHECK) [Y/n/?] y
Warn for stack frames larger than (needs gcc 4.4) (FRAME_WARN) [1024] 1024
Magic SysRq key (MAGIC_SYSRQ) [Y/n/?] y
Strip assembler-generated symbols during link (STRIP_ASM_SYMS) [N/y/?] n
Enable unused/obsolete exported symbols (UNUSED_SYMBOLS) [N/y/?] n
Debug Filesystem (DEBUG_FS) [Y/?] y
Run 'make headers_check' when building vmlinux (HEADERS_CHECK) [N/y/?] n
Kernel debugging (DEBUG_KERNEL) [Y/n/?] y
  Debug shared IRQ handlers (DEBUG_SHIRQ) [N/y/?] n
  Detect Soft Lockups (DETECT_SOFTLOCKUP) [N/y/?] n
  Detect Hung Tasks (DETECT_HUNG_TASK) [N/y/?] n
  Collect scheduler debugging info (SCHED_DEBUG) [N/y/?] n
  Collect scheduler statistics (SCHEDSTATS) [N/y/?] n
  Collect kernel timers statistics (TIMER_STATS) [N/y/?] n
  Debug object operations (DEBUG_OBJECTS) [N/y/?] n
  Debug slab memory allocations (DEBUG_SLAB) [N/y/?] n
Kernel memory leak detector (DEBUG_KMEMLEAK) [N/y/?] n
Debug preemptible kernel (DEBUG_PREEMPT) [N/y/?] n
RT Mutex debugging, deadlock detection (DEBUG_RT_MUTEXES) [N/y/?] n
Built-in scriptable tester for rt-mutexes (RT_MUTEX_TESTER) [N/y/?] n
Spinlock and rw-lock debugging: basic checks (DEBUG_SPINLOCK) [N/y/?] n
Mutex debugging: basic checks (DEBUG_MUTEXES) [N/y/?] n
Lock debugging: detect incorrect freeing of live locks (DEBUG_LOCK_ALLOC) [N/y/?] n
Lock debugging: prove locking correctness (PROVE_LOCKING) [N/y/?] n
Lock usage statistics (LOCK_STAT) [N/y/?] n
Spinlock debugging: sleep-inside-spinlock checking (DEBUG_SPINLOCK_SLEEP) [N/y/?] n
Locking API boot-time self-tests (DEBUG_LOCKING_API_SELFTESTS) [N/y/?] n
kobject debugging (DEBUG_KOBJECT) [N/y/?] n
Verbose BUG() reporting (adds 70K) (DEBUG_BUGVERBOSE) [Y/n/?] y
Compile the kernel with debug info (DEBUG_INFO) [Y/n/?] y
Debug VM (DEBUG_VM) [N/y/?] n
Debug filesystem writers count (DEBUG_WRITECOUNT) [N/y/?] n
Debug memory initialisation (DEBUG_MEMORY_INIT) [N/y/?] n
Debug linked list manipulation (DEBUG_LIST) [N/y/?] n
Debug SG table operations (DEBUG_SG) [N/y/?] n
Debug notifier call chains (DEBUG_NOTIFIERS) [N/y/?] n
Debug credential management (DEBUG_CREDENTIALS) [N/y/?] n
Delay each boot printk message by N milliseconds (BOOT_PRINTK_DELAY) [N/y/?] n
torture tests for RCU (RCU_TORTURE_TEST) [N/m/y/?] n
Check for stalled CPUs delaying RCU grace periods (RCU_CPU_STALL_DETECTOR) [N/y/?] n
Self test for the backtrace code (BACKTRACE_SELF_TEST) [N/m/y/?] n
Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n
Force weak per-cpu definitions (DEBUG_FORCE_WEAK_PER_CPU) [N/y/?] n
Fault-injection framework (FAULT_INJECTION) [N/y/?] n
Latency measuring infrastructure (LATENCYTOP) [N/y/?] n
Sysctl checks (SYSCTL_SYSCALL_CHECK) [Y/n/?] y
Debug page memory allocations (PAGE_POISONING) [N/y/?] (NEW) 
Enable dynamic printk() support (DYNAMIC_DEBUG) [N/y/?] n
Verbose user fault messages (DEBUG_USER) [N/y/?] (NEW) 
Verbose kernel error messages (DEBUG_ERRORS) [N/y/?] (NEW) 
Enable stack utilization instrumentation (DEBUG_STACK_USAGE) [N/y/?] n
Kernel low-level debugging functions (DEBUG_LL) [N/y/?] (NEW) 
#
# configuration written to .config
#




  CHK     include/linux/version.h

  SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h

  HOSTCC  scripts/pnmtologo
  CC      scripts/mod/empty.o
arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      kernel/bounds.s
arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....





make: *** [scripts] Error 2
I just held down enter for the config part.
 

kumarmarld

New member
Jul 27, 2007
1
0
Hi adrynalyne
I have followed your steps and have found some issues with my setup potentially. Can you help me please.
When you refer to:
"This installs the kitchen and starts it up. Now the first thing we need to do is setup a working directory. Take a rom, any rom, and copy it to the ogiinal_update folder inside the kitchen. You can then setup your working folder.
Inside the working folder, delete boot.img. Grab, one of say, my kernels, and extract it. Take boot.img from the extracted contents and copy to the kitchen."

1.) What do you mean by taking any rom? Where can I get this from and what does the file look like (i.e. file extension, etc..)
2.) What is the working folder
SOrry for my ignorance - I am new to this.

Cheers

Raj
 

prscott1

Senior Member
Nov 5, 2007
807
23
Houston
1.) What do you mean by taking any rom? Where can I get this from and what does the file look like (i.e. file extension, etc..)
2.) What is the working folder
SOrry for my ignorance - I am new to this.

Cheers

Raj

1)Just copy any rom's xxxxx.zip file to the ~/android/kitchen/original_update directory. You have probably downloaded some from this forum.

2) the working folder is the folder that is created after you run the ./menu and select number 1 - it will setup a new folder named kitchen_something.

HTH.
 
  • Like
Reactions: sffmandrake

prscott1

Senior Member
Nov 5, 2007
807
23
Houston
I am using 32 bit version of Ubuntu 11.04 what would the correct Compiler toolchain to use? Ive done some searching and I am a little lost.

Grab the advanced package from this site: http://www.codesourcery.com/sgpp/lite/arm/portal/release642.

Unpack the downloaded bz2 file. It will unpack a toolchain directory. For easiest use to follow this tutorial: copy the unpacked directory to your ~/android directory. After you copy it to the android directory, rename it to 4.4.4 - So, then, if you followed the tutorial, you should have the following folders under ~/android: 4.4.4 , kernels, kitchen

then continue to follow adryn's instruction. his make command is looking for the arm-none-eabi- executables in your ~/home/android/4.4.4/bin folder, so this puts them there.

Otherwise, change your make command to point to the bin in the toolchain folder you just unpacked.

This works for me running 32 bit 1104 ubuntu.
 
Last edited:

V!KR@M

Senior Member
Mar 11, 2011
938
312
Beaumont
Hi does this process apply for other phones also? I hav Samsung galaxy 3. Is it same?

Thanks in advance...

Sent from my GT-I5800 using XDA App
 

desai827

Member
Apr 11, 2011
44
1
I haven't learned yet otherwise I would. See if there is an overclocked kernel available already.

GingerRemix 2.1 ¦ Imoseyon's GB Kernel 3.3.6 ¦ MR 2.5 Radio
 

Top Liked Posts

  • There are no posts matching your filters.
  • 58
    Updated. You can find an easier to use and more up to date version here:

    http://rootzwiki.com/topic/8824-howto-compile-your-own-kernel-v-01/





    Hey folks,

    Figured I would throw this out there for those who may want to know just what goes into compiling a kernel, and possibly, doing it themselves. This is a WIP, and is more about how to compile, than how to make changes to source or customize your own kernel.

    Needed:


    Linux. For this case, we will assume Ubuntu 10.10, 64 bit. This can be done with 32 bit as well, but you will need a different cross compiler.
    Download | Ubuntu

    dsixda's kitchen. So that we can easily split and repack kernels.
    https://github.com/dsixda/Android-Kitchen/archives/master

    Source. You can use mine. Its fairly heavily tweaked, and compiles without any modifcations.
    https://github.com/adrynalyne/kernel_htc-mecha

    A cross compiler toolchain. Because I use 64 bit linux, I use a 64 bit cross compiler.
    http://rapidshare.com/files/394529815/HikaRi_toolchain_4.4.4.tbz2
    (Credit adwinp from XDA)



    Introduction

    First, we install Ubuntu. I won't be going through that, however. So, assuming we have Ubuntu already installed, and working, we are ready to dive right in.

    First, we need a tool Ubuntu does not install by default. This is called git. From a terminal:

    Getting Source Code
    sudo apt-get install git

    Once git is installed, we can grab our source. Using a terminal:

    [chaos@oblivion ~]$

    code
    Code:
    mkdir android
    cd android
    mkdir kernels
    cd kernels
    git clone git://github.com/adrynalyne/kernel_htc-mecha.git

    Depending on your connection, this could take a while.

    This will create a kernel_htc-mecha directory under your /home/username/android/kernels folder.


    Grabbing Toolchain
    Now we will grab the toolchain. Download it, decompress it, and just leave it in the 4.4.4 directory. Move it to your android directory.

    Grabbing and setting up the kitchen
    Download the kitchen from the link given above, and decompress it. Rename it to kitchen. Move it to your android directory. Then from a terminal:

    code
    Code:
    cd ~/android/kitchen
    chmod 755 menu
    ./menu

    This installs the kitchen and starts it up. Now the first thing we need to do is setup a working directory. Take a rom, any rom, and copy it to the ogiinal_update folder inside the kitchen. You can then setup your working folder.

    Inside the working folder, delete boot.img. Grab, one of say, my kernels, and extract it. Take boot.img from the extracted contents and copy to the kitchen.

    To split the initramfs (ramdisk) from the kernel, simply choose 0 from the menu, then 20. Hitting w will extract the kernel to a BOOT-EXTRACTED directory inside the kitchen (not working folder). Inside that folder, you will find the ramdisk and a zImage. The zImage is the kernel. We will stop there for now.

    Compiling the kernel
    First, we move to the kernel directory.

    code
    Code:
    cd ~/android/kernels/kernel_htc-mecha

    To compile the kernel, first we must have a configuration file ready. To do this:

    code
    Code:
    make mecha-lte_defconfig

    It will configure the system for compiling.

    Now to compile the kernel:

    code

    Code:
    make -j5 ARCH=arm CROSS_COMPILE=/home/username/android/4.4.4/bin/arm-none-eabi-


    Where username is your, well, username and the number after j (thats a J) is the number of cpus +1.


    Depending on the speed of your system. a zImage should be created within 3-30 minutes.


    Packing the kernel

    The zImage will be located under ~/android/kernels/kernel_htc-mecha/arch/arm/boot directory.

    We will copy that zImage into the BOOT-EXTRACTED directory of the kitchen. Then, back at our menu for the kitchen, we hit 'b' to build the kernel. Within seconds, there is a new boot.img inside our Working folder. Now, remember my kernel package you downloaded? Well, time to kang the installer! The directory you unzipped contains a META-INF and system directory. You need both of those. Copy the boot.img in with those two folders.

    So, our directory layout currently looks like so:
    META-INF
    system
    boot.img


    We need one more file, the wifi driver, from our compiled source.

    Under ~/android/kernels/kernel_htc-mecha/drivers/net/wireless/bcm4329_204 you will find a file named bcm4329.ko. Copy this into system/lib of your new kernels installer directory.

    Zip these three folders and give it a name. Now its ready to install.

    A couple of things of note:

    You almost always have to match the wifi driver with the kernel.

    make clean mrproper will clean all the precompiled and temp fikes out of your source. This is recommended when making major source changes. Don't forget to remake your configuration after running it though.


    Troubleshooting

    There may be some files not found errors. Please be careful with these commands.

    If the files not found are libcloog.so.0 and/or libmpfr.so.1, take a look below.

    Code:
    sudo ln -s /usr/lib/libcloog-debian.so.0 /usr/lib/libcloog.so.0
    sudo ln -s /usr/lib/libmpfr.so.4 /usr/lib/libmpfr.so.1
    1
    Thank you so much for spending the time to write this, i have been googleing this and your write up is the best ive found.

    I know this is a work in progress, but some ideas for future revisions, at least things that I have been wondering,

    The files tweaked for overclocking, undervolting, and maybe some explanations on what goes into this.

    Important files and maybe files we should not touch, (if there are any).

    Just things I have wondered.

    Thank you again!!!
    1
    Uggg, I am running Ubuntu 10.10 64bit.

    I have followed this step by step but I am getting the following error:

    /home/scott/android/4.4.4/bin/../libexec/gcc/arm-none-eabi/4.4.4/cc1: error while loading shared libraries: libcloog.so.0: cannot open shared object file: No such file or directory
    make[2]: *** [scripts/mod/empty.o] Error 1
    make[1]: *** [scripts/mod] Error 2
    make: *** [scripts] Error 2
    make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!

    What package am I missing? I apt-get installed libcloog-ppl0.

    Any help is appreciated.
    Scott

    Go to /usr/lib and tell me what the name of libcloog.so.? Is. There are bound to be growing pains with this, as I originally used Fedora 64 bit when I did this. Still, its doable on Ubuntu, because I have this same toolchain on Arch as well.

    Let me know what the name of that file is. I will help all I can.

    Sent from my ADR6400L using XDA App
    1
    1.) What do you mean by taking any rom? Where can I get this from and what does the file look like (i.e. file extension, etc..)
    2.) What is the working folder
    SOrry for my ignorance - I am new to this.

    Cheers

    Raj

    1)Just copy any rom's xxxxx.zip file to the ~/android/kitchen/original_update directory. You have probably downloaded some from this forum.

    2) the working folder is the folder that is created after you run the ./menu and select number 1 - it will setup a new folder named kitchen_something.

    HTH.