[Desire 626 Android Development] BigCountry907:
Getting Running Kernel Configuration

#1 Lets get the current running Kernel Version

cd ~/a32e-kernel-build/Device-Files/Boot/

dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'

My output is as follows.

Linux version 3.10.49-perf-g26c2269 (and@AABM) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Sat Oct 31 02:35:36 CST 2015

7202481+0 records in

7202481+0 records out

7202481 bytes (7.2 MB, 6.9 MiB) copied, 5.4281 s, 1.3 MB/s

Hopefully you see or know why this is important to us.

In order for our new kernel to load and not reject existing modules the version of the new kernel must match.

Linux version 3.10.49-perf-g26c2269

And also the 26c2269 is the number we need,

to match the exact commit of the source code that this specific kernel was built upon.

In theory when we checkout a branch and that would be used as part of the tag.

Right now the most important thing to us is the "-perf"

And the ".-g26c2269"

We will need those soon.

Now lets get that .config / a32e_defconfig file.

Wayy back in step number 2 of the 1st post you were supposed to get the HTC-DEV Kernel source.

If you didn't it's time we need it now.

http://www.htcdev.com/devcenter/downloads

When you get to the HTC-DEV download page just filter by device and select desire 626s.

#1 Set Up Basic HTC-DEV Source Directory Structure

cd
mkdir ~/android
mkdir ~/android/device
mkdir ~/android/device/a32e
mkdir ~/android/device/a32e/platform

#2 Setup the Kernel Source

mv ~/Downloads/a32eul-3.10.49-perf-ga4d7327.zip ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip
unzip ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip -d ~/android/device/a32e/
rm -f ~/android/device/a32e/a32eul-3.10.49-perf-ga4d7327.zip
cd ~/android/device/a32e/
tar -xvzf ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327.tar.gz
rm ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327.tar.gz
mv -v ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327/* ~/android/device/a32e/
rm -rf ~/android/device/a32e/248_kernel_a32eul-3.10.49-perf-ga4d7327
mv ~/android/device/a32e/platform.tar.gz ~/android/device/a32e/platform/

#3 Pull the config from the kernel

cd ~/android/device/a32e/scripts/
./extract-ikconfig ~/a32e-kernel-build/Device-Files/Boot/Boot.img-zImage > Big-Country_defconfig
mv -f Big-Country_defconfig ~/android/device/a32e/arch/arm/configs
mkdir ~/a32e-kernel-build/Device-Files/Configs/ORIGINAL/
cp -f ~/android/device/a32e/arch/arm/configs/Big-Country_defconfig ~/a32e-kernel-build/Device-Files/Configs/ORIGINAL/

Open up the Big-Country_defconfig

It is in the folder ~/android/device/a32e/arch/arm/configs

Open it with G-Edit or whatever text editor you use.

Search for CONFIG_LOCALVERSION=

and change it to CONFIG_LOCALVERSION="-g26c2269"

Open up the main makefile. in the folder ~/android/device/a32e/Makefile

VERSION = 3

PATCHLEVEL = 10

SUBLEVEL = 49

EXTRAVERSION =

NAME = TOSSUG Baby Fish

At the top of the file change EXTRAVERSION =

EXTRAVERSION = -perf

Now lets backup the edited Big-Country_defconfig.

cp -f ~/android/device/a32e/arch/arm/configs/Big-Country_defconfig ~/a32e-kernel-build/Device-Files/

Now were cooking. :cool: