Xperia™ S open source archive released with building instructions


Are you a custom ROM developer? If so, you’ve probably checked out our Sony Xperia™ open source archives before. Last year we told you how to build a Linux kernel. Today we’re releasing the open source archive for the Xperia™ S, which contains files you can use when building a kernel. This is the first time we publish source code for a product built on the Qualcomm Snapdragon S3 platform, and to flash this software, you need do some additional steps and run a script that we also release today. Read more after the jump!

The open source archive for the Xperia™ S is the latest addition to our open source archives. To be able to flash the software on Xperia™ S, you need to add a proprietary firmware file (RPM.bin) to your kernel by using a script called mkelf.py. This script is used specifically for Xperia S and replaces mkbootimg, which you would normally use. The script creates a flashable image needed to flash your ROM onto Xperia S. If you don’t do this, you won’t be able to flash the software on your Xperia™ S.
The Resource Power Manager (RPM) is a hardware block required for managing shared resources in order to optimise power consumption. RPM communicates with processors and hardware accelerators in each subsystem to process and coordinate shared resource requests. Since the RPM.bin file is a proprietary file provided by Qualcomm, you will need to accept an end user license agreement before you can download it. The script (mkelf.py) is released under the 3 –clause BSD open source license.
How to use the flash tools
Download RPM_firmware_for_Xperia_smartphones_20120319.zip and image_generation_script_for_Xperia_smartphones.zip, to somewhere on your computer. Then perform the following steps:
1. Create the kernel image by executing the following command in the command prompt:
 python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.img@0x41200000,ramdisk RPM.bin@0x20000,rpm
2. Flash and reboot your phone with the following commands:
 fastboot -i 0x0fce flash boot kernel.elf
 fastboot -i 0x0fce reboot
So, are you eager to start developing your own ROM for Xperia S? Check out our open source archives for Sony Xperia™ phones, and feel free to drop us a comment below if you have any questions!