dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Search | Go
Wiki > Main > SonyNW > SonyNWToolchains

Sony NW/NWZ series: Toolchain information

The linux-based SonyNW players come with a toolchain provided by Sony. Unfortunately the toolchain is hard/impossible to build completely because it is incomplete.You can build a toolchain on your own. But be warned there are version dependency issues, patches required to make it work and the lack of flexibility using the packages from the global source code distribution.

This page documents what we know about those toolchain and how to build one using crosstool-ng.

Sony uses at least two different SoC (see SonyNWAnalysis) and different kernels. It is thus most likely that there are different versions of the toolchain in use.

Toolchain list and players

We are currently aware of the following toolchains:

SoC CPU GCC binutils kernel glibc
mp200/Emma Mobile1 ARM1176JZF-S 4.1.2 2.23 2.6.23 2.7

Sony MP200/Emma Mobile1 with kernel 2.6.23

This toolchain is in use in at least the following players:
  • NWZ-E43x
  • NWZ-A86x
  • NWZ-S76x

Sony toolchain

The Sony toolchain is provided with RPM but cannot be completely built. The following information was extracted from it:
  • GCC 4.1.2 with patches, compiles for ARM1176JZF?-S
  • Glibc 2.7 with patches, compiles for kernel 2.6.23
  • Binutils 2.7 with patches

The original toolchain was distributed by Sony with a build script and some patches against the vanilla sources of the binutils, gcc and newlib. The patches were updated for later versions and a working set of the components were found: gcc 4.1.2, binutils 2.17 while the newlib remained the same

TODO: put output of gcc -v and other info.

Crosstool config

The Crosstool-NG Configuration file can be found here . Please keep in mind the following instructions:

Notes on sony-arm-linux:

- To ease debugging, the config file tells ct-ng to save state so that build can be restarted on failure.

- Because of some weirdness in the tools that come with the kernel, you need to have the 32-bit (i386) version of your SYSTEM headers (ie the host your are compiling with), on Debian that's:

* Linux-libc-dev:i386.

* Libgcc-dev:i386 OR libgcc-5-dev:i386 OR libgcc-6-dev:i386 (choose the one that matches your system gcc version).

* Gcc-multilib.

* Glibc 2.19 is required. It is the latest one to support kernels before 2.6.32 in Crosstool-NG.

- You might need to play with LIBRARY_PATH to tell it to consider the 32-bit libraries.


- Copy sony-arm-linux.config to .config.

- Run ct-ng menuconfig and:

- At least change CT_PREFIX_DIR (in Path and misc options > Prefix directory) to the prefix of where you want to install the toolchain.

- Run ct-ng build.


- You need to download the sony kernel and put the tarball in the same directory as the ct-ng config, in file named linux-kernel-2.6.23.local.tgz.


- For linux-kernel-2.6.23.local.tgz:

* scripts/unifdef.c: replace "getline" by "my_getline" everywhere


-- AmauryPouly - 14 Aug 2016
r5 - 17 Aug 2016 - 13:19:26 - RobertDundee

Parents: SonyNW
Copyright by the contributing authors.