[INFO] Building the Linux kernel for Xperia phones

Search This thread

KalleD

Senior Member
May 6, 2011
98
611
Hi all devs,
Please use this thread for questions related to the information in the article:
How to build a Linux kernel and flash it to the phone on Sony Ericsson Developer Blog.

We will try to monitor this thread, but we cannot guarantee an answer for every question asked.

Regards
/Karl-Johan Dahlström
Sony Ericsson Developer Program


For me more developer information please check out Developer World.
 

blunden

Senior Member
Jun 11, 2009
1,002
327
Great to see you going all out with the new improved Android stategy. Just a nitpick though:

The "Why rebuild the kernel?" section doesn't really make sense. I'd say theming and removing apps is as far from kernel-related as you can get while staying within the confines of Android. :p I'm sure you know that as a developer and that it's just that the text has passed through the PR department a few times. Perhaps you can say something like "It allows you to add new features and get the latest security fixes".
 

MrHassell

Senior Member
Dec 10, 2010
393
249
Melbourne
innertech.com.au
Thank you for this :)

Very nice to see you on XDA :)

Phear not my friendly X10 phonez will see the light of day in this thread too!

Neo / Pro / Play
Code:
mkbootimg --base 0x00200000 --kernel kernel/arch/arm/boot/zImage --ramdisk ramdisk.img -o boot.img

X10
Refer back to this post to get thing's into context, there are custom kernels and the files provided by Bin4ry, Goroh and Jerpelea are available - *advanced development skills required* - It will be simplified and much work continues to make this happen for the community as AOSP.

http://xdaforums.com/showthread.php?t=726813
 

coolbho3000

Retired Senior Recognized Developer
Dec 26, 2008
897
785
Can someone please post a boot.img from the Arc, the Neo, and the Play?
 

sim-value

Senior Member
Sep 27, 2009
185
5
Hello there, im trying to build the kernel contained in the "3.0.A.2.181_182.tar.bz2" file.

I used the -i option because it halts at a warning:
Code:
cc1: warnings being treated as errors
init/main.c: In function 'do_one_initcall':
init/main.c:711:10: error: 'calltime.tv64' may be used uninitialized in this function
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

When used with -i it still doesn't build the zImage, because it cannot find a lot of files ?

Code:
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find init/main.o: No such file or directory
make[1]: [init/built-in.o] Error 1 (ignored)
  LD      .tmp_vmlinux1
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find init/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find arch/arm/mm/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find kernel/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find drivers/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find net/built-in.o: No such file or directory
make: [.tmp_vmlinux1] Error 1 (ignored)
  KSYM    .tmp_kallsyms1.S
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-nm: '.tmp_vmlinux1': No such file
No valid symbol.
make: [.tmp_kallsyms1.S] Error 1 (ignored)
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find init/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find arch/arm/mm/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find kernel/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find drivers/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find net/built-in.o: No such file or directory
make: [.tmp_vmlinux2] Error 1 (ignored)
  KSYM    .tmp_kallsyms2.S
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-nm: '.tmp_vmlinux2': No such file
No valid symbol.
make: [.tmp_kallsyms2.S] Error 1 (ignored)
  AS      .tmp_kallsyms2.o
  LD      vmlinux
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find init/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find arch/arm/mm/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find kernel/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find drivers/built-in.o: No such file or directory
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-ld: cannot find net/built-in.o: No such file or directory
make: [vmlinux] Error 1 (ignored)
  SYSMAP  System.map
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-nm: 'vmlinux': No such file
make: [vmlinux] Error 1 (ignored)
  SYSMAP  .tmp_System.map
/home/sim/CodeSourcery/SGL/bin/arm-none-eabi-nm: '.tmp_vmlinux2': No such file
make: [vmlinux] Error 1 (ignored)
make[1]: *** No rule to make target `vmlinux', needed by `arch/arm/boot/Image'.  Stop.
make: [zImage] Error 2 (ignored)

The command I use to build is:
Code:
ARCH=arm CROSS_COMPILE=/home/sim/CodeSourcery/SGL/bin/arm-none-eabi- make

Am I doing something wrong?
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
@KalleD

seems that there is a 60 fps cap inbuilt into the Arc kernel... how to remove this fps cap?
 

hrockh

Senior Member
Aug 25, 2009
456
96
Bristol
I shall thank you very much for the effort you are putting to close the gap between the customer and the firm itself. As we know, this really improves your company image and the satisfaction of your client.

The relationship company/customer is changing in these years, and it's all done by the internet. And the idea which sustains the internet, Open Source.
It's allowing communication, an extremely powerful tool which has to be used wisely.

Hope that Sony is capable of understand that the community (us, xda) could only give a big help to further improve your software.
But we do expect a well-written software to start from, as the Arc is able to show now.
Please do not even think "oh well.. let's not spend money on sw development.. xda will do". Wrong. Wrong.
We are here to refine your product, give you suggestion (not only on sw but also on hardware), not creating.

You are walking on the correct path now, Sony. And with us at your right, I'm sure we will going a long way

Luca

Just need to tell us how to unlock the Sim-locked boot loaders now, and the whole world would be a sweeter place :D
that's strictly speaking illegal bud lol
 

KalleD

Senior Member
May 6, 2011
98
611
Hi devs,
First of all I would like to thank you for the nice comments and the warm welcoming here at XDA.
I see some comments in regards to the X10 and I tried to give an answer at our blog.

And for the specific technical questions I needed some help from my great colleague James.

James comments below:
@sim-value
“I have no idea what’s going on here. I’ve tried the files again, and it does compile fine. Could you please share what environment you are working in, Linux distribution, CodeSourcery version and variant, etc, I could try more..”

@DooMLoRD
“I know there’s been a lot of discussions regarding framerate caps, and let me assure you, it’s all to improve the user-experience.
Disabling the framerate cap will degrade the visual appearance, introducing tearing artifacts, and stuttering when navigating lists, etc.
However, assuming you just want higher figures when benchmarking, and care less about the experience, here’s the general steps:
1. You need to set the system property “debug.gr.swapinterval” to 0. A typical command for this would be:
adb shell setprop debug.gr.swapinterval 0
2. For this to take effect, you will need to restart the system-server. You could do this with:
adb shell
stop zygote
start zygote
Also, please note that this setting is not “persistent”, meaning that the next time you reboot your device, the setting will reset to 1 unless you’ve modified your initrd to do this at every boot.”

Hope we can continue to have an ongoing dialogue with you devs! Specifically I would like to thank
For the people reading this, I, and the people from the Sony Ericsson Developer Program will be at GoogleIO tomorrow, please come and meet with us at the Sony Ericsson booth.

Let’s keep the dialogue going!
/Karl-Johan
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
@KalleD
thank you for your reply...
I have both the X10 & Arc and I was really amazed to see the difference in performance when I used the Arc (with 60fps caps) in comparison to X10 (30 fps cap)... the X10 is noticeably laggy because of this software cap... at the X10 forums we have some custom kernels in the beta stage... One of the devs was able to implement a kernel with uncapped fps and we are very happy with the performance... will it be possible for SE Devs to provide some sort of solution for raising this fps cap to 60 fps or removing it all-together, in form of future kernel releases (open source contributions) or kernel modules (.ko files)?
 

Linkinsoldier

Senior Member
Jun 26, 2009
355
52
Munich
@KalleD
honestly, after the x10 (mini) disaster regarding firmware upgrades, I wasn't sure that I'll stay on the S/// road (which i've been on for about 8 Years now!). But this is just great, and I can't wait till I get my hands on the new xperia pro & mini pro!

Meanwhile, I was thinking: Is it possible, to also trigger the LED Backlight under the hardware keys (on the front) if there is any notification color blinking on the side? I'm pretty sure the hardware backlight LED is only white color, but still. If this one keeps on blinking, you can easily check the LED on the side or wake up your arc.

The present LED notification system on the arc is pretty much useless (sorry for that!), and I'm glad to see you guys changed it back on the xperia mini pro!
 

ashman84

Senior Member
Mar 20, 2009
85
3
@KalleD
honestly, after the x10 (mini) disaster regarding firmware upgrades, I wasn't sure that I'll stay on the S/// road (which i've been on for about 8 Years now!). But this is just great, and I can't wait till I get my hands on the new xperia pro & mini pro!

Meanwhile, I was thinking: Is it possible, to also trigger the LED Backlight under the hardware keys (on the front) if there is any notification color blinking on the side? I'm pretty sure the hardware backlight LED is only white color, but still. If this one keeps on blinking, you can easily check the LED on the side or wake up your arc.

The present LED notification system on the arc is pretty much useless (sorry for that!), and I'm glad to see you guys changed it back on the xperia mini pro!


+1 on the configurable front LED lights! Love the Arc, but the badly places LED lights is a lil bit of a downer.

But to see actually SE developers on XDA creating a thread to help external devs out is down right shocking! I had an x10 too and the experience was less than satisfactory (support wise). But this, this is an almost revolutionary move by SE.

Kudos to the SE team and whoever it was in SE's top management to give this initiative the go ahead.

Also, a special thanks to you Karl-Johan Dahlstrom for taking the effort to reach out to devs/customers etc. Someone should start a fan page of yours on fb. lol
 

im_iceman

Senior Member
Apr 7, 2010
2,196
130
Alsager
+1 on all of that.. it's a brilliant and indeed revolutionary move..

@KalleD - Big issue for us right now is in creating some kind of recovery solution.. Xrecovery from the X10 and CWM don't work and the devs are struggling to figure it out.. is there anything you can do to help out with this - I guess people are rightly concerned about flashing stuff to their phone without a recovery option!

Cheers.
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
+1 on all of that.. it's a brilliant and indeed revolutionary move..

@KalleD - Big issue for us right now is in creating some kind of recovery solution.. Xrecovery from the X10 and CWM don't work and the devs are struggling to figure it out.. is there anything you can do to help out with this - I guess people are rightly concerned about flashing stuff to their phone without a recovery option!

Cheers.

zdzihu & Bin4ry have been trying to get the recovery binaries, which were working with X10 (QSD8250) to work on Arc (QSD/MSM8255), but seems to be some compatibility issue... since they dont have device to test... its taking longer...
 
  • Like
Reactions: omtay2311995

Top Liked Posts

  • There are no posts matching your filters.
  • 65
    Hi all devs,
    Please use this thread for questions related to the information in the article:
    How to build a Linux kernel and flash it to the phone on Sony Ericsson Developer Blog.

    We will try to monitor this thread, but we cannot guarantee an answer for every question asked.

    Regards
    /Karl-Johan Dahlström
    Sony Ericsson Developer Program


    For me more developer information please check out Developer World.
    12
    Hi devs,
    First of all I would like to thank you for the nice comments and the warm welcoming here at XDA.
    I see some comments in regards to the X10 and I tried to give an answer at our blog.

    And for the specific technical questions I needed some help from my great colleague James.

    James comments below:
    @sim-value
    “I have no idea what’s going on here. I’ve tried the files again, and it does compile fine. Could you please share what environment you are working in, Linux distribution, CodeSourcery version and variant, etc, I could try more..”

    @DooMLoRD
    “I know there’s been a lot of discussions regarding framerate caps, and let me assure you, it’s all to improve the user-experience.
    Disabling the framerate cap will degrade the visual appearance, introducing tearing artifacts, and stuttering when navigating lists, etc.
    However, assuming you just want higher figures when benchmarking, and care less about the experience, here’s the general steps:
    1. You need to set the system property “debug.gr.swapinterval” to 0. A typical command for this would be:
    adb shell setprop debug.gr.swapinterval 0
    2. For this to take effect, you will need to restart the system-server. You could do this with:
    adb shell
    stop zygote
    start zygote
    Also, please note that this setting is not “persistent”, meaning that the next time you reboot your device, the setting will reset to 1 unless you’ve modified your initrd to do this at every boot.”

    Hope we can continue to have an ongoing dialogue with you devs! Specifically I would like to thank
    For the people reading this, I, and the people from the Sony Ericsson Developer Program will be at GoogleIO tomorrow, please come and meet with us at the Sony Ericsson booth.

    Let’s keep the dialogue going!
    /Karl-Johan
    7
    Hi all,
    We have seen in some forums and threads here at XDA that customers unlocking the boot loader on their phones have experienced problems when they accept a FOTA (Firmware upgrade Over The Air) update. The issue has been reproduced and we are working on a solution. For customers that have unlocked the boot loader please do not accept the Firmware upgrade OTA.

    Will keep you posted on the progress,
    /Kalle
    6
    Hi,
    Sorry I have been away a few days.
    @NielDK
    Trying to understand what is wrong, hopefully we can come with an answer for you soon.

    @all,
    A few days ago the product blog announced the new upgrade for Xperia arc and Xperia PLAY. (Small Note: It is my team that created the video for the global marketing team ;) )
    But what I wanted to say is that we have uploaded the new open source archives for that release (2.3.3).

    Unfortunately I don't have any progress, that I can report, on a recovery solution. Will get back when I have more to share.

    Thanks all for all your great comments!

    /Kalle
    6
    Again thanks for all comments, sorry it has taken some time for me to reply but I had to gather some more information in order to reply plus that GoogleIO stole some of my time.
    BTW: I will forward your appreciation comments to internal stakeholders that are not on XDA as well ;).

    With the help from the expert James I have been able to put together some answers on question received.

    @ Linkinsoldier and ashman84
    To control the LEDs behind the front-keys on Xperia Arc and Xperia Neo (Play doesn’t have LEDs behind the buttons), you can use the standard Linux LED class.
    Example (you need to be root for this):
    echo 255 > /sys/class/leds/button-backlight/brightness
    This will simply turn on the LEDs at full brightness. To have notifications actually trigger this, there will need to be changes done to liblights, something a custom-rom builder probably should be able to do using the method above.


    @Mach1Chris
    Question on EHCI/Host/OTG on Arc.
    The Arc does have OTG support compiled into the kernel already. However, if you’re attempting to use it as a host-device, please take great care in how you’re doing the wiring, as OTG isn’t actually Host-mode. Also, the amount of drivers compiled into the kernel for various USB client devices is quite slim.

    @m3dteam
    A question on how to disable auto-brightness on Xperia PLAY.
    Unfortunately, being able to do this from userspace might be non-functional in the released kernel for Play. The engineering team is aware and it is something they are looking into for future releases, can’t comment if it will be supported though yet.
    However, if you’re building your own kernel, you can modify the file arch/arm/mach-msm/board-semc_zeus.c
    What you’re looking for is the structure “as3676_platform_data”, where you can change the “als_connected = 1” to “als_connected = 0”.

    @DooMLoRD
    Question on changing the fps cap for X10
    The HW display has a refresh rate of 30Hz on Xperia X10 and as a programmer you don’t want to have a higher value for the cap than that as that will only be unused data (screen refresh rate is limited by the 30Hz). My guess is that you have managed to change other things if you have seen a performance increase.
    Unfortunately I can’t comment on which Kernel that will be used for the SW upgrade for X10 to Gingerbread. Please stay tuned and I will be able to give you more details as we are getting closer to release of that SW. Also keep an eye on the Sony Ericsson product blog for updates.

    @im_iceman
    I am aware that we don’t have a recovery ROM in place. There are some reasons why that is the case. One reason for not supporting FOTA updates after the phone has been unlocked is that FOTA is a delta between two know SW releases and as the phone has been unlocked we can’t be sure of the SW release currently on the phone. I will bring this question back to see if we could allow phones that has been unlocked to be updated via “SW update service” which would be a way to get a Sony Ericsson ROM back on the phone, but please note the warranty may still have been voided as the phone has been unlocked and some data like DRM certificates have been removed (these will not be recovered via the SW update service).

    Regards,
    /Kalle