These are the build instructions to rebuild the open source components for a number of Sony Televions models. (For the exact model list, see the web page where you obtained this file.) Please note: rebuilding the source code and reinstalling the resulting programs onto the device are not supported by our technical support department! Installing modified software will void the product warranty! Pre-requisites: Make sure you have at least 20G of free space for the build. 1. Install Ubuntu VERSION="14.04.6 LTS, Trusty Tahr" - 64-bit (AMD64) desktop image 2. package install The build requires some i386 packages. Add the i386 architecture to enable installation of these packages: dpkg --add-architecture i386 Now install required packages, libraries and tools: apt-get update apt-get upgrade apt-get install -y openssh-server nfs-common cifs-utils samba apt-get install -y expect pigz p7zip rar emacs ruby vim wget apt-get install -y ntp apt-get install -y openjdk-7-jdk update-alternatives --config java update-alternatives --config javac apt-get install -y git gnupg flex bison gperf build-essential apt-get install -y zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev apt-get install -y libgl1-mesa-dev g++-multilib mingw32 tofrodos apt-get install -y python-markdown libxml2-utils xsltproc zlib1g-dev:i386 apt-get install -y gawk libxml-libxml-perl apt-get install -y libx11-dev:i386 apt-get install -y libreadline6-dev:i386 apt-get install -y git make zlib1g-dev:i386 zip python-networkx apt-get install -y git-core gnupg flex bison gperf build-essential apt-get install -y zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 apt-get install -y lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache apt-get install -y libgl1-mesa-dev libxml2-utils xsltproc unzip apt-get install -y gitg git-gui lzop zlib1g-dev indent lftp lvm2 realpath apt-get install -y git-email enca vim elinks sshfs mingw32 bonnie++ doxygen gzip joe apt-get install -y libncurses5-dev libncurses5 libgmp3-dev libmpfr-dev libmpc-dev apt-get install -y libc6-dev-i386 libcloog-ppl-dev gawk libssl-dev dos2unix apt-get install -y libz-dev apt-get install -y liblz4-dev apt-get install -y liblzo2-dev apt-get install -y liblzma-dev apt-get install -y binutils apt-get install -y texinfo apt-get install -y gettext apt-get install -y cmake apt-get install -y procmail bc apt-get install -y pkg-config apt-get install -y autoconf apt-get install -y intltool libglib2.0-dev ln -s /usr/lib/x86_64-linux-gnu/crt*.o /usr/lib ln -sf /lib/i386-linux-gnu/libncurses.so.5 /usr/lib32/libncurses.so ln -sf /lib/x86_64-linux-gnu/libncurses.so.5 /usr/lib/libncurses.so ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/libz.so 3. Configure to use 'bash' shell by default (instead of 'dash') echo "dash dash/sh boolean false" | debconf-set-selections && dpkg-reconfigure -p critical dash 4. Install automake-1.13 apt-get install -y autoconf wget http://ftp.gnu.org/gnu/automake/automake-1.13.2.tar.gz tar -xf automake-1.13.2.tar.gz && cd automake-1.13.2 && ./configure --prefix=/usr/automake && make && make install 5. Download cross-compiler wget https://releases.linaro.org/archive/15.06/components/toolchain/binaries/4.8/arm-linux-gnueabi/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabi.tar.xz -O /tmp/gcc.tar.xz cd /tmp/ tar -xf gcc.tar.xz cd gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabi/bin export PATH=$(pwd):$PATH 6. Download the packages Download the packages for the product from the same page where you obtained this README_ENV.txt file. 7. Extract the source Use tar to extract the contents of each source archive. tar -xf .tar.gz It is recommended to create a separate directory for each archive that you un-archive. Each package includes a top-level README file that indicates dependencies (packages that should be built *BEFORE* that package) and build instructions. 8. Prepare installation directory You can install the software whereever you would like, using the installation scripts provided (usually 'make install'), or the instructions in the README. The READMEs usually direct you to install the build output somewhere under /target_rootfs Create your output directory before starting to build individual packages. mkdir /target_rootfs 8. Build each package The README file provide build instructions and indicates dependencies (packages that should be built *BEFORE* that packages). Some packages have sub-packages (for example zlib) mentioned in their build dependency list. Make sure to untar the nested archives and build all sub-packages or dependent packages first, before building the main package. Some dependencies refer to other top-level packages, or to their sub-packages. The following build order is recommended: * libusb * libusb-compat * libmtp-0.3.6 * libmtp-1.1.6 * fuse * simple-mtpfs * qrencode * e2fsprogs * mtd-utils-1.3.0-lzo-2.08 * procps * linux * DirectFb * JavaScriptCore * gstreamer-builder * qt-everywhere * [remaining other packages] IMPORTANT: Some of the build instruction indicate to set environment variables for a build (such as CFLAGS). Make sure to unset those environment variables at the end of each package or sub-package build, to avoid using them incorrectly with the next build.