17 pagesV  1 2 3 4 5 6 > »  
 
THEME IS CLOSED
> Kernel build | for example Motorola QUENCH XT5 / GSmart 1305
sergeyotro
Message#1
19.03.12, 23:52
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

A manual on building the kernel on the example of Motorola Quench XT5, GSmart 1305, Commtiva Z71, Orange Boston

A small remark: since I use Ubuntu, all the instructions will be written according to the use of this distribution.


|Attention! Hooves! Attention! Achtung!
The article is already more than 5 years old and I am no longer interested in the assembly of firmware / kernels. We kindly request -no need to ask me questions on the article in the LAN.
Ask in this thread, maybe someone will help.


The article implies that you should have some kind of experience in the GNU / Linux OS, because if you have difficulties, for example, moving between folders from the console, then you will have to deal with it yourself. If there is no experience, but really want to try - welcome to the siteUbuntology, learn to work with the OS, and then we will build the kernels.

Also - the article does not affect the work with fastboot and adb programs, digging into source codes and working with git repositories.
The last two are huge topics that I can’t describe. Learn to program, read the documentation and everything will turn out. Some links are in the article. And the first point I just too lazy to describe. : D


| download

Preparing for kernel compilation


So, for starters, it would be nice to do the manipulations with the system described in the "Installing the JDK" and "Installing required packages" paragraphs byTyts.

Create the aosp folder and the aosp / prebuilt folder in the home directory, with commands
cd
mkdir aosp
cd ~ / aosp
mkdir prebuilt
cd prebuilt


Download a large pack of files with the command
git clone git: //github.com/CyanogenMod/android_prebuilt.git.

In the last command, the point should be, this is not a typo.

After - open the ~ / .bashrc file with the command
gedit ~ / .bashrc

and at the very end add the following lines:
PATH = $ PATH: ~ / aosp / prebuilt / linux-x86 / toolchain / arm-eabi-4.4.3 / bin
export PATH

After which we will need to restart the console.
Attention, if you unzipped the archive not in the "aosp" folder, then in this line you need to change the path to the folders to yours.

|Preparing to build the kernel
In the home directory, create a folder "kitchen", in which we will "prepare" the kernel.

From hereDownload two scripts, unpack-bootimg.pl and repack-bootimg.pl in the folder "kitchen".
From hereDownload the archive and unpack it into the "kitchen" folder.


|Get the kernel sources

For purposes of example, let's take the sourcefrom my repository on github. After downloading - unpack the archive in the folder "aosp / commtiva-kernel-z71".
In this example, the source is obtained by us "barbaric" by - downloading the archive. There is a much more convenient way - getting through Git. Who cares -welcome hereandhere.


|Kernel Setup and Compilation

From the console, go to the folder with our kernel
cd ~ / aosp / commtiva-kernel-z71


Perform the basic configuration of the kernel from a template compiled in advance.
make ARCH = arm fxx_defconfig

Here it is necessary to make a remark - in the kernels from rmcc this template is called in this way, in the stock kernel 2.6.29 - from msm7627_defconfig is called, therefore it is impossible to give exact recommendations.

For owners of other devices- if you are using a kernel compiled from the sources you have - the configuration file can be obtained directly from the phone, using the command
adb pull /proc/config.gz ~ / aosp / config.gz

In the aosp folder you will have an archive with a config file. Unzip the archive, rename the file using your_defconfig name, for example mydevice_defconfig, and put along the path ~ / aosp / path-to-your-source-kernels / arch / arm / configs.
And, after, to create a configuration file, use the command
make ARCH = arm mydevice_defconfig


After configuration, you can configure the kernel using the command
make ARCH = arm menuconfig

But, if you get something wrong, it's not my fault. :)

Having finished with setup we start, actually, compilation
make ARCH = arm CROSS_COMPILE = arm-eabi- -j4

The -j4 option is needed only if you have a multi-core processor. Digit 4 defines the number of cores (threads, in the case of Intel i3, i5, i7 processors). For example, I have Intel i5, it is dual-core, but it supports two threads per core, so 2 * 2 = 4.

If everything went well, then in the aosp / commtiva-kernel-z71 / arch / arm / boot folder you will find the compiled file "zImage".


| Packing the kernel in boot.img

We will need boot.img, since in the example I will compile the kernel from Cyanogen Mod, then I took boot.img from the archive of the last nightly build.
Through the console, go to this folder, execute
./unpack-bootimg.pl boot.img

At the output we get a folder with ramdisk called "boot.img-ramdisk" and a few more files.

After that, open the file repack-bootimg.pl with a text editor and the line
system ("mkbootimg - cmdline 'no_console_suspend = 1 console = null' --kernel $ ARGV [0] --ramdisk ramdisk-repack.cpio.gz -o $ ARGV [2]");

Replace with a line
system ("mkbootimg - cmdline 'no_console_suspend = 1 console = null' --kernel $ ARGV [0] --ramdisk ramdisk-repack.cpio.gz -o $ ARGV [2] --base 0x12E00000");

ATTENTION ! If your device is different from G1305, XT5, Z71, Boston, then the parameter --base 0x12E00000 you do not fit, you need to look at the offset in the boot.img file using a HEX editor, or find out about your devices in the forums.
UPDATE: You can also find the offset using the command
cat .config | grep PHYS_OFFSET

Where .config is YOUR config. thank_Shumaher_for a hint.

After - we take zImage which we received after compilation of a kernel and we copy in the same folder. In the console, we write:
./repack-bootimg.pl zImage boot.img-ramdisk new-boot.img

If everything is done correctly, a new-boot.img file will appear, which can be flashed to the device via fastboot.


| Where else can I get the sources for z71, G1305, XT5?
1. Kernel 2.6.29 - Stock kernel with firmware 2.1
2. Kernel 2.6.32.9 - Stock kernel with firmware 2.2
3. Kernel 2.6.32.9 by CML
4. Kernel 2.6.32.9 by Edgar86


| Attention! Hooves! Attention! Achtung!
The article is already more than 5 years old and I am no longer interested in the assembly of firmware / kernels. We kindly request -no need to ask me questions on the article in the LAN .
Ask in this thread, maybe someone will help.

Attached files

Attached filez71_CML_SOURCES.tar.gz(94.9 MB)


Post has been editedsergeyotro - 20.03.17, 13:57


--------------------
sblblx
Message#2
27.03.12, 06:45
Visitor
**
[offline]

Group: Active users
Messages 29
Check in: 20.03.11
HTC Sensation

Reputation:-  1  +

Greetings Can anyone tell me which defconfig to use to build the stock core of HTC Sensation? Usually it’s like the name of the platform_defconfig, but pyramid_defconfig is not in the source code.
sergeyotro
Message#3
27.03.12, 09:06
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

sblblxif there is a working core, based on these sources, then you can get the config from the phone. It lies in the archive, on the way /proc/config.gz
Added to the instructions.

Post has been editedsergeyotro - 27.03.12, 18:48


--------------------
sblblx
Message#4
28.03.12, 05:52
Visitor
**
[offline]

Group: Active users
Messages 29
Check in: 20.03.11
HTC Sensation

Reputation:-  1  +

Not exactly what was meant. I know this way. But my core is different in the body ->The method does not fit. And to install a stock firmware for the sake of .config is a dubious pleasure ... I wanted to know what kind of defconfig from the source code I could use
sergeyotro
Message#5
28.03.12, 09:38
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

sblblxthen there is a connection with the developer of those sources that you have. Or you can try the configuration by the name of the platform on which the device is built. In the case of HTC Sensation, this will be msm8260-perf_defconfig, or msm8260_defconfig.


--------------------
sblblx
Message#6
29.03.12, 06:42
Visitor
**
[offline]

Group: Active users
Messages 29
Check in: 20.03.11
HTC Sensation

Reputation:-  1  +

There is neither one nor the other ...
loven-doo
Message#7
29.03.12, 11:25
Visitor
**
[offline]

Group: Active users
Messages 23
Check in: 01.03.11
Sony xperia acro s

Reputation:-  0  +

In the first paragraph in the second sub-item, the archive does not download all this stuff, so you need to download it with the help of "Git". Here is a link that briefly and clearly describes how to do it in Windowshttp://forum.zone-game.info/showthread.php?t=3404. Only, of course, there the code is different - not:
git clone git: //github.com/mangos/mangos.git

but:
git clone git: //github.com/CyanogenMode/android_prebuilt.git
.
sergeyotro
Message#8
29.03.12, 18:42
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

sblblxyou can try to slip any working config, then execute the command
make ARCH = arm oldconfig

And after - already with hands to adjust the changed settings, through menuconfig.

loven-doo
loven-doo @ 03/29/2012, 10:25*
git clone git: //github.com/CyanogenMode/android_prebuilt.git

Letteresuperfluous. :)

Post has been editedsergeyotro - 29.03.12, 18:42


--------------------
Touch'ik
Message#9
31.03.12, 23:59
Stubby
********
[online]

Group: Friendssavagemessiahzine.com
Messages 1528
Check in: 12.09.08
Google pixel 2

Reputation:-  101  +

And can someone build a core, well, so here I ask, will someone take it? If yes, please let me know, there is just one file to edit and compile, editing is not critical and will not cause errors ...
sergeyotro
Message#10
01.04.12, 00:09
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

Touch'ik,and what is the difficulty to do it yourself?


--------------------
Touch'ik
Message#11
01.04.12, 00:28
Stubby
********
[online]

Group: Friendssavagemessiahzine.com
Messages 1528
Check in: 12.09.08
Google pixel 2

Reputation:-  101  +

sergeyotroIt does not work out to prepare the system due to the lack of experience and all kinds of jambs with the discrepancy of the response system actions to the instruction points ...
sergeyotro
Message#12
01.04.12, 01:24
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

Touch'ik,The manual has links to the basic Ubuntu tutorial. It is perfectly placed on a virtual machine, you will not even need to break the disk. And if something does not work out according to the instructions, ask, this is a forum, and that’s what it needs. Moreover, I fully admit that I could make mistakes when writing instructions.


--------------------
Touch'ik
Message#13
01.04.12, 23:55
Stubby
********
[online]

Group: Friendssavagemessiahzine.com
Messages 1528
Check in: 12.09.08
Google pixel 2

Reputation:-  101  +

sergeyotromaybe you hit a solution? maybe you can tell what system or something else doesn’t work as described ...
sergeyotro
Message#14
02.04.12, 00:02
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

Touch'ik,I can not tell specifically in your case. In the OS settings, in the "Application Sources" item, you should enable "installing software from partners", or something like this is called. This is the first thing that comes to mind as a problem when installing the JDK.


--------------------
RAZR1
Message#15
03.04.12, 21:37
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 52
Check in: 21.12.11
Xiaomi Mi 5 Pro

Reputation:-  1  +

Good day))
I want (well, I'm trying to) build a kernel. : yes2: config.gz file which takes 14.20 to this is the kernel source? (I'm a little noob in this regard)
If I take the source of the kernel from the stock firmware, can I do overclocking and change the voltage? (what do you need to do with the kernel?)
Sori for Noob questions ...: offtopic:
sergeyotro
Message#16
03.04.12, 21:41
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

RAZR1,And now the counter question - did you even read the instructions? At least superficially, well.


--------------------
RAZR1
Message#17
03.04.12, 21:48
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 52
Check in: 21.12.11
Xiaomi Mi 5 Pro

Reputation:-  1  +

sergeyotroReached the end ... vserovno there are many questions: scratch_one-s_head:
sergeyotro
Message#18
03.04.12, 22:19
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

RAZR1,in order to "do overclocking and change voltage" you need to have at least superficial programming skills in C, just to be familiar with the Linux Kernel architecture.


--------------------
gulyuk
Message#19
04.04.12, 06:04
Theorist
*********
[offline]

Group: Honorary Gameday
Messages 5256
Check in: 14.10.11
Honor 7x

Reputation:-  891  +

sergeyotroA question of this kind, there are source codes of the old kernel (under 2.2), and on the device now the current stock 2.6.35.7
In general, I wanted to know if it is right to build a new kernel with config.gz or does the old one still need it?
Actually, yesterday I just tried to assemble, but there is a catch in the device, raw support and Krivorukovskaya developed, they did something that only new kernel works in firmware 2.3.4 (I tried the stock repackage)
do you think you can start the old kaknit?

Post has been editedgulyuk - 04.04.12, 06:06


--------------------
"Time doesn't believe in you ..." ©
sergeyotro
Message#20
07.04.12, 12:39
Cynic
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 864
Check in: 02.10.10
Nokia 8

Reputation:-  148  +

Gulyuk @ 04/04/2012, 06:04*
In general, I wanted to know if it is right to build a new kernel with config.gz or does the old one still need it?

You can try, but what stops you from getting the config from the old kernel?

Gulyuk @ 04/04/2012, 06:04*
But in the device there is a trick, raw support and Krivorukovy developed, they did something that only new kernel works in firmware 2.3.4 (I tried the stock repackage)

Do not confuse warm with soft. Raw support and Krivoruk developed - this is when the device reboots 5 times a day, and no one wants to fix it. Or wants, but can not, for lack of knowledge. What you have described is absolutely normal, since almost no core will work correctly with libraries written for a different version of the kernel.

Gulyuk @ 04/04/2012, 06:04*
do you think you can start the old kaknit?

And let's, after all, on "you."


--------------------

17 pagesV  1 2 3 4 5 6 > » 


 mobile version    Now: 05/20/19 08:38