Building Samsung Galaxy Gio Android Kernel from Source

Tools that you need to build the kernel

  • git
  • ARM Compiler Toolchain
  • Kernel Source Code

How to get kernel source code

  1. Download at support files below
  2. Download from github
    1. At your android, Open terminal and type:

      git clone https://github.com/iksteen/android_kernel_samsung_galaxygio

    2. Now we need to make a repo, type:

      mkdir ~/bin
      PATH=~/bin:$PATH
      curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
      chmod a+x ~/bin/repo
      mkdir WORKING_DIRECTORY
      cd WORKING_DIRECTORY
      repo init -u https://android.googlesource.com/platform/manifest -b gingerbread

    3. Give your name and email address, choose the color
    4. Next, type:

      repo sync -j32

      and wait until it`s done to sync.

 

Make sure you already have all application that need before do the next steps.

Build custom kernel for samsung galaxy gio

  1. still in terminal, type:

    mkdir android
    mkdir sources
    mkdir .Galaxy_Gio_Sources

  2. Hold ctrl+H on your home.
  3. Move your kernel source code to folder that you created and name it .Galaxy_Gio_Sources
  4. Copy paste ARM toolchain to source code folder
  5. go to source code folder and open makefile
  6. in makefile, find this:

    #ARCH?= $(SUBARCH)
    CROSS_COMPILE=

    change to

    #ARCH?= arm
    CROSS_COMPILE= ./arm-2009q3/bin/arm-none-linux-gnueabi-

  7. Back to terminal and type :

    cd android
    cd sources

  8. next, type:

    ln -s /home/*name of your desktop/.Galaxy_Gio_Sources/android_kernel_samsung_galaxygio

  9. Additional note:
    You can find config.gz file in your handphone with root explorer. it`s locate in proc/*config.gz. Copy those file to SDcard.
    Move to /android/sources/android_kernel_samsung_galaxygio/kernel/
  10. Type this command before compile

    export CCOMPILER=~/arm-2009q3/bin/arm-none-linux-gnueabi-

    or

    export CCOMPILER=/home/*name of your desktop/arm-2009q3/bin/arm-none-linux-gnueabi-

  11. next

    make ARCH=arm CROSS_COMPILE=$CCOMPILER gio_rev03_defconfig

  12. next

    make ARCH=arm CROSS_COMPILE=$CCOMPILER

    or directly w/o use export commands. Like these :

    cd android
    cd sources
    cd android_kernel_samsung_galaxygio
    chmod ugo+rwx bin

  13. then

    make menuconfig
    make ARCH=arm CROSS_COMPILE=/home/delano/android/sources/android_kernel_samsung_galaxygio/arm-2009q3/bin/arm-none-linux-gnueabi- [Example}

    or

    make menuconfig
    make ARCH=arm CROSS_COMPILE=/home/delano/android/sources/android_kernel_samsung_galaxygio/arm-2009q3/bin/arm-none-linux-gnueabi- -8[Example}

example of Compiling result

make menuconfig CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h’ is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
CC init/main.o
CHK include/generated/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/arm/kernel/compat.o
CC arch/arm/kernel/elf.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
CC arch/arm/kernel/irq.o
CC arch/arm/kernel/process.o
CC arch/arm/kernel/ptrace.o
CC arch/arm/kernel/return_address.o
CC arch/arm/kernel/setup.o
CC arch/arm/kernel/signal.o
CC arch/arm/kernel/sys_arm.o
CC arch/arm/kernel/stacktrace.o
CC arch/arm/kernel/time.o
CC arch/arm/kernel/traps.o
CC arch/arm/kernel/armksyms.o
CC arch/arm/kernel/module.o
CC arch/arm/kernel/sched_clock.o
CC arch/arm/kernel/sys_oabi-compat.o
CC arch/arm/kernel/pmu.o
CC arch/arm/kernel/perf_event.o
CC arch/arm/kernel/io.o
LD arch/arm/kernel/built-in.o
AS arch/arm/kernel/head.o
CC arch/arm/kernel/init_task.o
LDS arch/arm/kernel/vmlinux.lds
CC arch/arm/mm/dma-mapping.o
CC arch/arm/mm/extable.o
CC arch/arm/mm/fault.o
CC arch/arm/mm/init.o
CC arch/arm/mm/iomap.o
CC arch/arm/mm/fault-armv.o
CC arch/arm/mm/flush.o
CC arch/arm/mm/ioremap.o
CC arch/arm/mm/mmap.o
CC arch/arm/mm/pgd.o
CC arch/arm/mm/mmu.o
CC arch/arm/mm/vmregion.o
CC arch/arm/mm/proc-syms.o
CC arch/arm/mm/alignment.o
AS arch/arm/mm/abort-ev6.o
AS arch/arm/mm/pabort-v6.o
AS arch/arm/mm/cache-v6.o
CC arch/arm/mm/copypage-v6.o
CC arch/arm/mm/context.o
AS arch/arm/mm/tlb-v6.o
AS arch/arm/mm/proc-v6.o
CC arch/arm/mm/cache-l2x0.o
LD arch/arm/mm/built-in.o
CC arch/arm/common/clkdev.o
LD arch/arm/common/built-in.o
CC [M] arch/arm/common/cpaccess.o
CC arch/arm/mach-msm/io.o
CC arch/arm/mach-msm/dma.o
CC arch/arm/mach-msm/memory.o
CC arch/arm/mach-msm/clock.o
CC arch/arm/mach-msm/clock-voter.o
CC arch/arm/mach-msm/modem_notifier.o
CC arch/arm/mach-msm/cpufreq.o
CC arch/arm/mach-msm/nohlt.o
CC arch/arm/mach-msm/clock-debug.o
CC arch/arm/mach-msm/proc_comm.o
CC arch/arm/mach-msm/clock-pcom.o
CC arch/arm/mach-msm/internal_power_rail.o
CC arch/arm/mach-msm/vreg.o
CC arch/arm/mach-msm/mpp.o
CC arch/arm/mach-msm/pmic_debugfs.o
CC arch/arm/mach-msm/drop_caches.o
CC arch/arm/mach-msm/acpuclock.o
CC arch/arm/mach-msm/timer.o
CC arch/arm/mach-msm/irq-vic.o
AS arch/arm/mach-msm/idle-v6.o
CC arch/arm/mach-msm/smem_log.o
CC arch/arm/mach-msm/smd.o
CC arch/arm/mach-msm/smd_debug.o
CC arch/arm/mach-msm/remote_spinlock.o
CC arch/arm/mach-msm/socinfo.o
CC arch/arm/mach-msm/nand_partitions.o
CC arch/arm/mach-msm/pmic.o
CC arch/arm/mach-msm/rpc_hsusb.o
CC arch/arm/mach-msm/rpc_pmapp.o
CC arch/arm/mach-msm/rpc_fsusb.o
CC arch/arm/mach-msm/smd_tty.o
CC arch/arm/mach-msm/smd_qmi.o
CC arch/arm/mach-msm/smd_pkt.o
CC arch/arm/mach-msm/smd_nmea.o
CC arch/arm/mach-msm/smd_rpcrouter.o
CC arch/arm/mach-msm/smd_rpcrouter_device.o
CC arch/arm/mach-msm/smd_rpc_sym.o
CC arch/arm/mach-msm/smd_rpcrouter_servers.o
CC arch/arm/mach-msm/smd_rpcrouter_clients.o
CC arch/arm/mach-msm/smd_rpcrouter_xdr.o
CC arch/arm/mach-msm/rpcrouter_smd_xprt.o
CC arch/arm/mach-msm/ping_mdm_rpc_client.o
CC arch/arm/mach-msm/proc_comm_test.o
CC arch/arm/mach-msm/ping_apps_server.o
CC arch/arm/mach-msm/oem_rapi_client.o
CC arch/arm/mach-msm/rpc_server_dog_keepalive.o
CC arch/arm/mach-msm/rpc_server_time_remote.o
CC arch/arm/mach-msm/qdsp5/adsp.o
CC arch/arm/mach-msm/qdsp5/adsp_driver.o
CC arch/arm/mach-msm/qdsp5/adsp_info.o
CC arch/arm/mach-msm/qdsp5/adsp_rm.o
CC arch/arm/mach-msm/qdsp5/adsp_video_verify_cmd.o
CC arch/arm/mach-msm/qdsp5/adsp_videoenc_verify_cmd.o
CC arch/arm/mach-msm/qdsp5/adsp_jpeg_verify_cmd.o
CC arch/arm/mach-msm/qdsp5/adsp_jpeg_patch_event.o
CC arch/arm/mach-msm/qdsp5/adsp_vfe_verify_cmd.o
CC arch/arm/mach-msm/qdsp5/adsp_vfe_patch_event.o
CC arch/arm/mach-msm/qdsp5/adsp_lpm_verify_cmd.o
CC arch/arm/mach-msm/qdsp5/audio_out.o
CC arch/arm/mach-msm/qdsp5/audio_in.o
CC arch/arm/mach-msm/qdsp5/audio_mp3.o
CC arch/arm/mach-msm/qdsp5/audmgr.o
CC arch/arm/mach-msm/qdsp5/audpp.o
CC arch/arm/mach-msm/qdsp5/audrec.o
CC arch/arm/mach-msm/qdsp5/audio_evrc.o
CC arch/arm/mach-msm/qdsp5/audio_qcelp.o
CC arch/arm/mach-msm/qdsp5/audio_amrnb.o
CC arch/arm/mach-msm/qdsp5/audio_aac.o
CC arch/arm/mach-msm/qdsp5/audio_amrnb_in.o
CC arch/arm/mach-msm/qdsp5/audio_wma.o
CC arch/arm/mach-msm/qdsp5/audio_voicememo.o
CC arch/arm/mach-msm/qdsp5/audio_pcm.o
CC arch/arm/mach-msm/qdsp5/audio_amrwb.o
CC arch/arm/mach-msm/qdsp5/audio_wmapro.o
CC arch/arm/mach-msm/qdsp5/snd.o
CC arch/arm/mach-msm/qdsp5/snd_adie.o
LD arch/arm/mach-msm/qdsp5/built-in.o
CC arch/arm/mach-msm/pm2.o
etc

The result location from compiled kernel

arch/arm/boot/*zimage

Download Support file

Related Post