[Android] matrock47:
step 4 problem

Step 4. Getting a Config file

Option A. Pulling a config file from a kernel.

A. Hook up a device that is using a kernel similar to one you are using as your base.

B. Open a terminal

C. Change to your root kernel directory

D. Type "adb pull /proc/config.gz"

E. Type "gunzip config.gz"

F. Type "mv config arch/arm/configs/<your_config_name>_defconfig"

The above steps explained:

A. This will allow us to pull a base configuration file from a known working kernel. It makes it a lot easier to start out and let's us take baby steps through the whole process. As a note though not all kernel's support this, so you may have to try a few different one's to get it working. If that doesn't work, see option B.

B. Hehe, you are getting good at this step

C. Navigate to the uppermost directory of your kernel source.

D. Use adb to pull a copy of a working config file to use as your source.

E. Unzipping the config file.

F. Moving the configuration file you pulled to the config directory so we can reference it later.

Option B. Using the manufacturers config.

Unfortunately as stated above, not all kernels support the "/proc/config.gz" method. You can typically find a manufacturer's configuration file in "arch/arm/configs". I believe the one for my HTC Flyer was called "flyer_hc_defconfig", so look for a layout similar to that one. Also read the README to get a better idea of how to modify it. I would personally make a copy of it called "<your_config_name>_defconfig" and use that as my base.

Step 5. Building

Time to start the real "build" section of this tutorial.

Part A. Pre-build Steps

A. Open terminal and change to the root of your kernel directory

B. Type "export ARCH=arm"

C. Type "export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-"

Part B. The First Build

A. Type "make <your_config_name>_defconfig"

B. Type "make menuconfig" and make the required changes to use any modules you added or similar changes.

C. Type "make -j<maximum number of jobs>"

Part C. Re-Builds

A. Type "make clean"

B. Type "make oldconfig"

C. Type "make -j<maximum number of jobs>"

Part D. Building Modules

You have two options:

A. Type "make modules"

B. Type "make path/to/your/module.ko"

The above steps explained:

Part A.(These steps are required every time you close your terminal and re-open it to build again.)

A. Ok shouldn’t need to explain this.

B. This command sets your target architecture.

C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.

Part B.(These only need to be run the first time you build a kernel.)

A. Load's your configuration file from earlier.

B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.

C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j4". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.

Part C. (Use the command's when you are building any-time outside of the first)

A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every I build unless my changes are really small and localized.

B. A very awesome command, it parses through what has changed and only prompts you about new options.

C. See the explanation for the above "Part C.".

Part D.(Use these for just building kernel modules.)

A. This will re-build all modules.

B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.

where can i get config file? device not found