# [How-to][Guide]Compile the Stratosphere Stock Kernel



## lecapitan (Jun 28, 2012)

Here's a quick guide to compiling the stock kernel for the Samsung Stratosphere. I will assume you are a Windows user (especially meaning very little terminal usage), but it should be the same for any system.

Step 1: Get VirtualBox

Download: https://www.virtualb.../wiki/Downloads (Windows users you want this one: VirtualBox 4.1.18 for Windows hosts x86/amd64)

Step 2: Get a linux distro

I suggest Linux Mint: http://www.linuxmint.com/download.php/

Step 3: Create a linux virtual machine

Follow the steps in the VBox wizard. Set the OS as Ubuntu if unsure. After you create the virtual machine, mount the linux distro image you downloaded in the CDROM for the machine. Start the virtual machine and install your linux distro. Sit back and relax for a bit 

Step 4: Download the Samsung source code

The Samsung open source site is here: http://opensource.samsung.com/
Search for sch-i405. Download that zip on your virtual machine.

Step 5: Download the toolchain

The toolchain is here: http://smp-on-qemu.g...nux-gnu.tar.bz2

Step 6: Set up the source code

Go into your Home folder (should be on the desktop) and create some new folder to hold the Samsung source code. I created a folder named _android_kernel_samsung_stratosphere_. Double click the Samsung source code zip to open it. Copy the SCH-I405_VZW_Kernel.tar.gz file out of the zip into the folder you just created. Right click in the android_kernel_samsung_stratosphere folder and click Open in Terminal. Type '*tar -xf SCH*' and then hit the tab key. It should auto fill the SCH-I405_VZW_Kernel.tar.gz file name for you. Now hit enter. Leave this window open.

Step 7: Set up the toolchain

Open the folder where you downloaded the toolchain to (on Mint it should be Home/Downloads) right click in the folder and click Open in Terminal. Type this command '*sudo mkdir /opt/toolchains*'. It should ask for your password. Now type this command '*sudo mv arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 /opt/toolchains/arm-2009q3.tar.bz2*' (you can use tab to complete the first file name but not the second, so I made it short). Now type this command '*sudo tar -xjf /opt/toolchains/arm-2009q3.tar.bz2*'.

Step 8: Compile the kernel

Go back to the first terminal you had open. Type the command '*make arch=arm aegis_usa_defconfig*'. When it is done type this command '*make*' and go get a beer because it will take a while. When it is done, you have successfully compiled the stock kernel.

*Some warnings:*
*Do not put this kernel on your phone.* We need the initramfs files before this kernel would work and I am not completely sure how to get those yet. Plus, this kernel would not have root, so just forget about it for now. This is just a step in the right direction. Now you can help me hack the heck out of this kernel!

I have a 5gig vbox hard disk file that is clean and can compile the kernel. If you would rather just get an image with everything set up, give me some suggestions for a place that I could upload a 5gig file (because I have no idea).


----------



## lecapitan (Jun 28, 2012)

reserved


----------

