[Tutorial] Kernel building instructions for Xperia devices

Search This thread

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
hello folks!

i have been working on kernels for various xperia devices since the Xperia X10... i will update this thread with information on how to build kernels for various xperia devices...


Sony (Ericsson) started off helping the developer community with information on how to build kernels:
http://developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/

do read the above post, though its slightly old (2011), its really good! Since then Sony has released various devices which use a variety of chipsets and each chipset has different ways to build bootable kernel...

the objective of this thread is to provide brief instructions for some of these chipsets across the various device generations to build bootable kernels...

this will not cover how to build working ramdisks... you can always use the stock ramdisks from kernel.sin... here is how to get stock ramdisk out from kernel.sin...




Toolchains:

I have tested various toolchains for building kernels and very few work correctly on the kernel sources to get bootable kernel.

The toolchains which worked for me are:
  • arm-eabi-4.4.3 - GCC 4.4.3 toolchain from CyanogenMod repo
  • arm-eabi-linaro-4.6.2 - GCC Linaro 4.6.2 (2011.10) toolchain
  • arm-linux-androideabi-4.7 - GCC 4.7 from Google repo

all of these are posted on my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains

sometimes the kernel sources need to be modified slightly to support compiling using these toolchains. I have mentioned the necessary patches where-ever applicable.




Instructions for various generation of devices:

Xperia 2014 (H1) - msm8974ab - Xperia Z2

Xperia 2013 (H2) - msm8974 - Xperia Z1, Z Ultra, Z Ultra GPe, Z1 Compact

Xperia 2013 (H1) - apq8064 - Xperia Z, ZL, ZR, Tablet Z

Xperia 2013 (H1) - msm8960t - Xperia SP

Xperia 2012 (H2) - msm8960 - Xperia T, TX, V

Xperia 2012 (H1) - msm8660 - Xperia S, SL, Ion, Acro S

Xperia 2011 - msm8x55/msm7x30 - Xperia Arc, Play, Neo, Ray, etc
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for MSM8x55/MSM7x30


Latest sources available at:
http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/


Recommended toolchain:
GCC 4.6 Linaro


Fix Makefile for 4.6 Toolchain:
Code:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
       -Werror \
to:
Code:
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
       -Wno-unused-but-set-variable -Wno-uninitialized \



Supported boards on this platform:

  • zeus - Xperia Play, Xperia L
  • mogami - Xperia Arc, Arc S, Ray, Neo, etc


Building kernel (zImage):

for Xperia Arc (anzu):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_anzu_defconfig

for Xperia Play (zeus):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_zeus_defconfig


build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make  -j8




Instructions for building boot.img


first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm7x30_mogami_zeus


Sony used the standard boot.img format for this chipset devices


building boot.img

use the following command:
Code:
./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img




Special notes

  • Sometimes the compiled kernel will just not boot, will show blank screen. Workaround is, ramdisks needs to be filled with filler so that total size is bigger.
  • boot.img can be hotbooted (fastboot boot boot.img)



regards,

DooMLoRD
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for MSM8260/MSM8660


Latest sources available at:

Since I actively develop for a device of this platform (Xperia S) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8660/tree/sony_sources



Recommended toolchain:
GCC 4.7



Fixes for 4.7 Toolchain:

Makefile fix

defconfig fix



Supported boards on this platform:

  • fuji- Xperia S, SL, Ion, Acro S



Building kernel (zImage):

for Xperia S (nozomi):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fuji_nozomi_defconfig


build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8




Instructions for building kernel.elf

first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8660_fuji


Sony shifted to ELF format for this chipset...

They had posted instructions on there website:
http://developer.sonymobile.com/201...-archive-released-with-building-instructions/
(avoid using those files as they are for GingerBread)


building kernel.elf

use the following command (for JB):
Code:
python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.cpio.gz@0x41300000,ramdisk RPM_JB.bin@0x20000,rpm

the additional files required are posted at my build tools repo



Special notes

  • RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia S or Xperia Ion and GB/ICS/JB each have different RPMs
  • kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)



regards,

DooMLoRD
 
Last edited:
  • Like
Reactions: Z3PHYR and dbolivar

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for MSM8960


Latest sources available at:

Since I actively develop for a device of this platform (Xperia T) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960/tree/sony_sources



Recommended toolchain:
GCC 4.6 Linaro



Supported boards on this platform:

  • blue- Xperia T, TX, V



Building kernel (zImage):

for Xperia T (mint):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make blue_mint_defconfig


build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8




Instructions for building kernel.elf

first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960_blue


Sony uses ELF format for this chipset...




building kernel.elf

use the following command (for JB):
Code:
python mkelf.py -o kernel.elf zImage@0x80208000 ramdisk.cpio.gz@0x81400000,ramdisk RPM_JB.bin@0x00020000,rpm bootcmd_JB@0x00000000,cmdline

the additional files required are posted at my build tools repo



Special notes

  • RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia T or Xperia V as each have different RPMs
  • kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)



regards,

DooMLoRD
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for MSM8960T


Latest sources available at:

Since I actively develop for a device of this platform (Xperia SP) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960t/tree/sony_sources



Recommended toolchain:
GCC 4.7



Fixes for 4.7 Toolchain:

Makefile fix



Supported boards on this platform:

  • viskan- Xperia SP



Building kernel (zImage):

for Xperia SP (huashan):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make viskan_huashan_defconfig



build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make  -j8


incase u get errors like:
Code:
 error : /scripts/gcc-wrapper.py

just correct the permissions of that file
Code:
chmod 755 ./scripts/gcc-wrapper.py




Instructions for building kernel.elf

first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960t_viskan


Sony uses ELF format for this chipset...




building kernel.elf

use the following command:
Code:
python mkelf.py -o kernel.elf zImage@0x80208000 ramdisk.cpio.gz@0x81600000,ramdisk RPM.bin@0x00020000,rpm bootcmd@0x00000000,cmdline

the additional files required are posted at my build tools repo



Special notes

  • kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)



regards,

DooMLoRD
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for APQ8064


Latest sources available at:

Since I actively develop for a device of this platform (Xperia Z) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_apq8064/tree/sony_sources



Recommended toolchain:
GCC 4.7



Fixes for 4.7 Toolchain:

Makefile fix

prima fix



Supported boards on this platform:

  • fusion3- Xperia Z, ZL, Tablet Z, ZR



Building kernel (zImage):

for Xperia Z (yuga):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fusion3_yuga_defconfig



build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make  -j8





Instructions for building boot.img

first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/apq8064_fusion3


Sony uses slightly different boot.img format for this chipset...




building boot.img

use the following command:
Code:
./mkbootimg --base 0x80200000 --kernel zImage --ramdisk_offset 0x02000000 --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.emmc=true" --ramdisk ramdisk.cpio.gz -o boot.img

corrected build tools are posted at my build tools repo



Special notes

  • boot.img CANNOT be hotbooted (fastboot boot boot.img)



regards,

DooMLoRD
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Instructions for MSM8974


Latest sources available at:

I will soon be getting the Xperia Z1 and actively develop for it... i will keep the latest sources at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/sony_sources



Recommended toolchain:
GCC 4.6



Fixes for 4.6 Toolchain:

Makefile fix 1

Makefile fix 2



Supported boards on this platform:

  • rhine- Xperia Z1, Z Ultra



Building kernel (zImage):

for Xperia Z1 (honami):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make rhine_honami_defconfig



build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make  -j8





Instructions for building boot.img

first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/msm8974_rhine


Sony uses slightly different boot.img format for this chipset...




building boot.img

MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This binary can be found in the Cyanogen repo's or you can download a prebuild one in this thread.

to get the dt.img:
Code:
# path to kernel sources
KERNEL_SRC_PATH=~/android_kernel_sony_msm8974/

echo "generating device tree..."
./dtbTool -o dt.img -s 2048 -p {KERNEL_SRC_PATH}/scripts/dtc/ {KERNEL_SRC_PATH}/arch/arm/boot/

once u have the dt.img along with the zImage and ramdisk.cpio.gz use the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk ramdisk.cpio.gz --dt dt.img -o boot.img


corrected build tools are posted at my build tools repo



Special notes

  • boot.img CAN be hotbooted (fastboot boot boot.img)



regards,

DooMLoRD
 
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Hello doom,I want to ask you something.I manage to port your doomkernel v22 GB for Arc/Arc S to Neo/Neo V and I want permissions from you to share it in Neo forum.Sorry for asking here, but you don't answer me on the PM that I send you.

Sorry for my English.

Sent from my Xperia Neo V using xda app-developers app
 

RuLe89

Senior Member
Jan 22, 2011
126
55
it is possible port the kernel of 'xperia sp on xiaomi mi2a?
the two terminals have the same hardware
 

lozohcum

Senior Member
Jan 14, 2013
1,919
1,744
Internety
@OP
How can I attach my compiled zImage to CM10 build from source? I have already compiled kernel from source and now I want to use it in my CM10 build
 

updateing

Senior Member
Aug 25, 2012
489
1,141
Wuhan
Google Pixel C
Great tutorial! But I came across a problem:when compiling a CM kernel for Xperia TX,I need to change the command from
Code:
python mkelf.py -o kernel.elf zImage@0x80208000 ramdisk.cpio.gz@0x81[COLOR="red"]4[/COLOR]00000,ramdisk RPM_JB.bin@0x00020000,rpm bootcmd_JB@0x00000000,cmdline

to
Code:
python mkelf.py -o kernel.elf zImage@0x80208000 ramdisk.cpio.gz@0x81[COLOR="red"]7[/COLOR]00000,ramdisk RPM_JB.bin@0x00020000,rpm bootcmd_JB@0x00000000,cmdline

Otherwise the phone won't boot.Only black screen with backlight on and then reboot after pressing the power button,even no Sony/CM logo.

(Another strange case:when I use sksplit to split the official kernel,the ramdisk does lay in 0x81400000.But if I import the hayabusa_defconfig,compile the kernel from Sony source without any change and mkelf with official ramdisk@0x81400000,the phone still refuses to boot.I have to change the 4 to 7 to make this kernel boot.Why?)
 
Last edited:

joebonrichie

Senior Member
Sep 7, 2013
164
474
{MIRO/TIPO/J/E} Addresses

zImage --0x00208000
ramdisk --0x01400000
bootcmd --cmdline

i.e.
python mkelf.py -o boot.img zImage@0x00208000 1@0x01400000,ramdisk 2@cmdline
 
  • Like
Reactions: kodok17

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    hello folks!

    i have been working on kernels for various xperia devices since the Xperia X10... i will update this thread with information on how to build kernels for various xperia devices...


    Sony (Ericsson) started off helping the developer community with information on how to build kernels:
    http://developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/

    do read the above post, though its slightly old (2011), its really good! Since then Sony has released various devices which use a variety of chipsets and each chipset has different ways to build bootable kernel...

    the objective of this thread is to provide brief instructions for some of these chipsets across the various device generations to build bootable kernels...

    this will not cover how to build working ramdisks... you can always use the stock ramdisks from kernel.sin... here is how to get stock ramdisk out from kernel.sin...




    Toolchains:

    I have tested various toolchains for building kernels and very few work correctly on the kernel sources to get bootable kernel.

    The toolchains which worked for me are:
    • arm-eabi-4.4.3 - GCC 4.4.3 toolchain from CyanogenMod repo
    • arm-eabi-linaro-4.6.2 - GCC Linaro 4.6.2 (2011.10) toolchain
    • arm-linux-androideabi-4.7 - GCC 4.7 from Google repo

    all of these are posted on my git repo:
    https://github.com/DooMLoRD/android_prebuilt_toolchains

    sometimes the kernel sources need to be modified slightly to support compiling using these toolchains. I have mentioned the necessary patches where-ever applicable.




    Instructions for various generation of devices:

    Xperia 2014 (H1) - msm8974ab - Xperia Z2

    Xperia 2013 (H2) - msm8974 - Xperia Z1, Z Ultra, Z Ultra GPe, Z1 Compact

    Xperia 2013 (H1) - apq8064 - Xperia Z, ZL, ZR, Tablet Z

    Xperia 2013 (H1) - msm8960t - Xperia SP

    Xperia 2012 (H2) - msm8960 - Xperia T, TX, V

    Xperia 2012 (H1) - msm8660 - Xperia S, SL, Ion, Acro S

    Xperia 2011 - msm8x55/msm7x30 - Xperia Arc, Play, Neo, Ray, etc
    15
    Instructions for MSM8x55/MSM7x30


    Latest sources available at:
    http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/


    Recommended toolchain:
    GCC 4.6 Linaro


    Fix Makefile for 4.6 Toolchain:
    Code:
    KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
           -Werror \
    to:
    Code:
    KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
           -Wno-unused-but-set-variable -Wno-uninitialized \



    Supported boards on this platform:

    • zeus - Xperia Play, Xperia L
    • mogami - Xperia Arc, Arc S, Ray, Neo, etc


    Building kernel (zImage):

    for Xperia Arc (anzu):
    import defconfig
    Code:
    ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_anzu_defconfig

    for Xperia Play (zeus):
    import defconfig
    Code:
    ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_zeus_defconfig


    build zImage
    Code:
    ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make  -j8




    Instructions for building boot.img


    first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

    i have posted the build tools i use here:
    https://github.com/DooMLoRD/build_tools/tree/master/msm7x30_mogami_zeus


    Sony used the standard boot.img format for this chipset devices


    building boot.img

    use the following command:
    Code:
    ./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img




    Special notes

    • Sometimes the compiled kernel will just not boot, will show blank screen. Workaround is, ramdisks needs to be filled with filler so that total size is bigger.
    • boot.img can be hotbooted (fastboot boot boot.img)



    regards,

    DooMLoRD
    13
    Instructions for APQ8064


    Latest sources available at:

    Since I actively develop for a device of this platform (Xperia Z) latest sources can found at my git repo:
    https://github.com/DooMLoRD/android_kernel_sony_apq8064/tree/sony_sources



    Recommended toolchain:
    GCC 4.7



    Fixes for 4.7 Toolchain:

    Makefile fix

    prima fix



    Supported boards on this platform:

    • fusion3- Xperia Z, ZL, Tablet Z, ZR



    Building kernel (zImage):

    for Xperia Z (yuga):
    import defconfig
    Code:
    ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fusion3_yuga_defconfig



    build zImage
    Code:
    ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make  -j8





    Instructions for building boot.img

    first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

    i have posted the build tools i use here:
    https://github.com/DooMLoRD/build_tools/blob/master/apq8064_fusion3


    Sony uses slightly different boot.img format for this chipset...




    building boot.img

    use the following command:
    Code:
    ./mkbootimg --base 0x80200000 --kernel zImage --ramdisk_offset 0x02000000 --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.emmc=true" --ramdisk ramdisk.cpio.gz -o boot.img

    corrected build tools are posted at my build tools repo



    Special notes

    • boot.img CANNOT be hotbooted (fastboot boot boot.img)



    regards,

    DooMLoRD
    6
    Instructions for MSM8974


    Latest sources available at:

    I will soon be getting the Xperia Z1 and actively develop for it... i will keep the latest sources at my git repo:
    https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/sony_sources



    Recommended toolchain:
    GCC 4.6



    Fixes for 4.6 Toolchain:

    Makefile fix 1

    Makefile fix 2



    Supported boards on this platform:

    • rhine- Xperia Z1, Z Ultra



    Building kernel (zImage):

    for Xperia Z1 (honami):
    import defconfig
    Code:
    ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make rhine_honami_defconfig



    build zImage
    Code:
    ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make  -j8





    Instructions for building boot.img

    first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

    i have posted the build tools i use here:
    https://github.com/DooMLoRD/build_tools/blob/master/msm8974_rhine


    Sony uses slightly different boot.img format for this chipset...




    building boot.img

    MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This binary can be found in the Cyanogen repo's or you can download a prebuild one in this thread.

    to get the dt.img:
    Code:
    # path to kernel sources
    KERNEL_SRC_PATH=~/android_kernel_sony_msm8974/
    
    echo "generating device tree..."
    ./dtbTool -o dt.img -s 2048 -p {KERNEL_SRC_PATH}/scripts/dtc/ {KERNEL_SRC_PATH}/arch/arm/boot/

    once u have the dt.img along with the zImage and ramdisk.cpio.gz use the following command:
    Code:
    ./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk ramdisk.cpio.gz --dt dt.img -o boot.img


    corrected build tools are posted at my build tools repo



    Special notes

    • boot.img CAN be hotbooted (fastboot boot boot.img)



    regards,

    DooMLoRD
    6
    Instructions for MSM8960T


    Latest sources available at:

    Since I actively develop for a device of this platform (Xperia SP) latest sources can found at my git repo:
    https://github.com/DooMLoRD/android_kernel_sony_msm8960t/tree/sony_sources



    Recommended toolchain:
    GCC 4.7



    Fixes for 4.7 Toolchain:

    Makefile fix



    Supported boards on this platform:

    • viskan- Xperia SP



    Building kernel (zImage):

    for Xperia SP (huashan):
    import defconfig
    Code:
    ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make viskan_huashan_defconfig



    build zImage
    Code:
    ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make  -j8


    incase u get errors like:
    Code:
     error : /scripts/gcc-wrapper.py

    just correct the permissions of that file
    Code:
    chmod 755 ./scripts/gcc-wrapper.py




    Instructions for building kernel.elf

    first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...

    i have posted the build tools i use here:
    https://github.com/DooMLoRD/build_tools/tree/master/msm8960t_viskan


    Sony uses ELF format for this chipset...




    building kernel.elf

    use the following command:
    Code:
    python mkelf.py -o kernel.elf zImage@0x80208000 ramdisk.cpio.gz@0x81600000,ramdisk RPM.bin@0x00020000,rpm bootcmd@0x00000000,cmdline

    the additional files required are posted at my build tools repo



    Special notes

    • kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)



    regards,

    DooMLoRD