Self-compiled kernel from source



Rep: (2213)
This material is not intended to be absolute truth, it may be that something can be done faster and easier. The author knows how to, and does. In addition, it is not a great expert in the field of nix-systems. Everything that is written below, found on the Internet, mostly on non-Russian-speaking forums, systematized and presented in the native language of the author - Russian.

Content:
Part 1. Required tools and source code.
Part 2: Unpacking the sources.
Part 3. Configuring and compiling a kernel.

Additionally:
Getting initramfs.cpio from the kernel (zImage)

Colleagues, do not ask me questions on this topic in a personal, for several years now as I threw the Android and not interested in the development of nuclear, as well, and most Android-a.

Post has been editedPawill - 08.03.16, 14:54



Rep: (2213)
Part 1. Required tools and source code

To compile the kernel, we need to nix-like operating system. I usedUbuntu 10.04 LTS - Long-term support 32-bitWhich is installed on a virtual machineVMware Workstation. Where is it good download / purchase, how to set up, we will not discuss here. If you have not been able to do on their own or with the help of Google, then read this article for you too early (or too late). :)
And so, we have everything set up and running. Now check if all necessary components are present in the system, it is possible that some packets have doustanovit.
Run the terminal:
Attached Image


In the terminal, enter the following command: [1]
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev gcc-multilib g ++ - multilib libc6-dev x11proto-core -dev libx11-dev libz-dev gawk texinfo automake libtool cvs libsdl-dev


Judging by the last line I have all the packages on the spot:
Attached Image


You, most likely, will not be an important package - sun-java6-jdk on Ubuntu 10.04 (Lucid). For it is necessary to automatically download in the repository addresses to add additional links. Enter in a terminal:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

and then
sudo apt-get update
sudo apt-get install sun-java6-jdk


After all download and install again the team [1] until the error. We assume that with Ubuntu committed.

Now we need the actual kernel sources themselves. They can be found athttp://opensource.samsung.com/. In the search bar, enter "I9000" and get:
Attached Image


We are interested in JPX GT-I9000_OpenSource_Froyo_update2.zip (211 MB), we do like the image below and hit "Continue".
Attached Image

Attached Image


More, we need a cross-compiler, which will build the kernel:
http://www.codesourcery.com/sgpp/lite/arm/...nux-gnu.tar.bz2(80MB)
Attached Image


And the last thing that is required - it initramfs.cpio. I tore it out JS8. How to do this will tell you how something separately.
Attached fileJS8_initramfs.tar(2.64 MB)


So far, so, to be continued ...

Post has been editedPawill - 19.03.11, 19:38



Rep: (2213)
Part 2: Unpacking the sources

All that you have downloaded will be stored in the directory / home / username / Downloads. I have this path looks like:
/ Home / pawill / Downloads

Returning to the terminal (or restarted). Do not forget to add a keyboard Russian language and way of switching layouts.
And so we collect:
cd Downloads

Further
ls

That's what we see:
Attached Image

Extract (which would not gain handles using copy / paste):
tar xjf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

unzip GT-I9000_OpenSource_Froyo_update2.zip

tar -xf JS8_initramfs.tar

There were two directories arm-2009q3, GT-I9000_OpenSource_Froyo_update2 and file JS8_initramfs.cpio
Attached Image

Further
cd GT-I9000_OpenSource_Froyo_update2

This directory contains two tar-archive:
Attached Image

Unpack:
tar xzf GT-I9000_Kernel.tar.gz

Appeared directory Kernel:
Attached Image



Rep: (2213)
Part 3. Configuring and compiling a kernel

Because configurator does not understand Cyrillic, the file JS8_initramfs.cpio need to shift from a catalog "Downloads" to the next level.
Attached Image

Go to Kernel catalog:
cd GT-I9000_OpenSource_Froyo_update2 / Kernel

There, seeing a bunch of directories and files:
Attached Image

Further:
make aries_eur_defconfig

Attached Image

make menuconfig

Attached Image

Without changing the current section "General setup" Hit Enter
Attached Image

We went down to the point of "Initramfs source file (s)":
Attached Image

Hit Enter and set the path to the file JS8_initranfs.cpio (which shifted)
Attached Image

Further, "OK">"Exit">"Exit">"Yes"
Attached Image

Run the compiler:
make ARCH = arm CROSS_COMPILE = / home / username / Downloads / arm-2009q3 / bin / arm-none-linux-gnueabi-

Attached Image

We sit and smoke about 5-10 minutes, on Warnings do not pay attention, the main thing that the error was not, but then the compilation process interrupted himself:
Attached Image

Everything is ready:
Attached Image

The nucleus is located in the directory / home / pawill / Downloads / GT-I9000_OpenSource_Froyo_update2 / Kernel / arch / arm / boot:
Attached Image

Packed in tar:
tar cvf My_Super_Puper_kernel.tar zImage

Sews on the unit and observe the following picture kernel version:
Attached Image

Everything. What I am worn out.

Post has been editedPawill - 22.03.11, 23:54



Rep: (1980)
For those who for the first time faced with Ubuntu:
1. If you are installing on VMWare recommend to create a disc size 8 gigs, because after all the updates and manipulation system of claim 1 eat 4 gig
2. For the convenience of the terminal I recommend to put Midnight Commander, for this type in the terminal command mc, and get instructions on how to put it - copy the proposed command and run it in the terminal. According resembles headlights, substituting the file name in the command is done by shift-enter
3. For use apktool, smali, dex2jar in Ubuntu is easy to collect the latest versions of these utilities - recommendations for local assembly there on the pages of the respective projects. To work needed mvn, hq, svn, git - placed by analogy with mc.
M
Please do not use slang and abbreviations in the names of the programs. Should write "the Bluetooth on Qtek S100В», rather than В«Blutus on KuTek C100." The messages try to use the original name of the program or device. In the future this will facilitate the search for the name in the subject line.


Post has been editedmaster_lie - 30.08.13, 19:25



Rep: (2213)
Romm @ 07.04.2011, 21:24*
Dear, PaWill, I want to ask, is the continuation of the lesson? And for the 2.3.3 source code in the same place you need to take?

In the same, but the sources 2.3.3 while Samsung has not laid out.
I would, for example, was interested in the kernel to add rekaveri 2, how to change the voltage and frequency proca.
But while this of information I have.
If someone knows how to do it and can describe in detail, then you are welcome to this topic.



Rep: (4018)
PaWill @ 09.04.2011, 11:50*
how to change the voltage and frequency proca.

Well frequency think it is necessary to rule Kernel \ arch \ arm \ mach-s5pv210 \ cpu-freq.c, and on the voltage of Kernel \ arch \ arm \ mach-s5pv210 \ max8998_consumer.c .. well, depending on what law, possibly in nearby fiddle files .. but the foundation - these 2 files



Rep: (1980)
PaWill @ 09.04.2011, 09:50*
I would, for example, was interested in the kernel to add rekaveri 2, how to change the voltage and frequency proca.

This of course all have an interest, but rather sporty. At this point in my root problem is much more acute.
For JVK experts hda made symbiosis regular kernel and root. the process of assembling / disassembling and TOOLS is in this threadhttp://forum.xda-developers.com/showthread.php?t=975349
I was able to disassemble the kernel under this yubuntoy. If interested you can try to experiment with the assembly of nuclei with Ruth from staff on the example of ready JV1 / K.
In the near future to come (hopefully) the next wave of firmware to 2.3.3 and these skills will come in handy.
Just how much is still not resolved the issue understand the assembly of pure (without integrated CSC) factoryfs.rfs to build soy firmware.



Rep: (29)
PaWill @ 18.03.2011, 22:00*
And the last thing that is required - it initramfs.cpio. I tore it out JS8. How to do this will tell you how something separately.

Where I would take it<_<

Well, in their firmware

Post has been editedjoey123 - 14.04.11, 19:47



Rep: (12)
explain nuba as compiled specific module or driver. Zvinyayus course



Rep: (29)
who will explain where I take thisinitramfs.cpio : wallbash:
all rummaged

Post has been editedjoey123 - 18.04.11, 17:35



Rep: (1980)
joey123 @ 18.04.2011, 17:29*
who will explain where I get this all rummaged initramfs.cpio

1. Look in this topichttp://forum.xda-developers.com/showthread.php?t=975349
there is a script in the header to rebuild kernels, such as the desired occurs when parsing
just as there is an open source version of this file
2. similar project from FuguModhttp://forum.xda-developers.com/showthread.php?t=812836
kernel source and initramfshttps://github.com/renaudallard

Post has been editedfguy - 19.04.11, 22:12



Rep: (2213)
Getting initramfs.cpio from the kernel (zImage)
1. Download script to retrieve .cpio (XDA)Attached fileinitramfs.tar(3.5 KB)

2. Extract the archive.
tar -xf initramfs.tar

3. In the same catalog we place zImage, pulled out of the piercing.
4. Perform initramfs.sh not forget to set the permissions 777
initram.sh zImage

In the catalog Downloads find initrafs.cpio

Note.
From kernel 2.3.3 extract the .cpio I did not succeed. Since I did not understand the reason.

Post has been editedPawill - 23.04.11, 18:51
Reason for editing: spelling



Rep: (29)
I understand that from the boot.img
boot.img-kernel - is zImage kernel image. Just rename zImage ??
boot.img-ramdisk.gz - cpio / gz file ramdisk with init.rc
that's what happened
joeu @ ubuntu: ~ / Downloads $ perl initramfs.sh zImage
-I- Extracting kernel image from zImage (start = 14729)
3017787 + 0 records in
3017787 + 0 records out
3017787 bytes (3.0 MB) copied, 14.3085 s, 211 kB / s

gzip: stdin: decompression OK, trailing garbage ignored
-I- Extracting compressed cpio image from kernel image (start = 4,742,428)

gzip: stdin: decompression OK, trailing garbage ignored
-I- Extracting initramfs image from /tmp/cpio.img (start =, end = 11)
dd: invalid number `'

There was a file in the Downloads, but the size is 0 bytes

Post has been editedjoey123 - 24.04.11, 19:27



Rep: (29)
joey123 @ 24.04.2011, 18:54*
There was a file in the Downloads, but the size is 0 bytes

help :(



Rep: (29)
How to set permissions 777 in Ubuntu. All the best in the folder properties write-read I press OK and nothing changes. Prompt stupid

Post has been editedjoey123 - 03.05.11, 18:50



Rep: (2)
A kernel version depends on whether it turns into a collecting account?



Rep: (1040)
pomoymu acceleration is on the way

arch / arm / mach-msm / acpuclock.c,



Rep: (35)
Ubuntu gives people in line

[Sudo] password for makcimian:

but the password is not entered



Rep: (0)
Makcimian @ 17.07.2011, 23:07*
Ubuntu gives people in line

Code
[Sudo] password for makcimian:
but the password is not entered

In * nix systems, the password entered in the console does not otobrazhaetsya.Vizualno it is not visible, but it is, after entering.

Post has been editedsavamura2000 - 18.07.11, 09:40



Rep: (35)
the people and for the I9003 which sources should be taken?


Full version    

Help     rules

Time is now: 04/04/20, 16:09