Interview With Developers of SaberMod & Hyper Toolchains

Interview With Developers of SaberMod & Hyper Toolchains

We may earn a commission for purchases made using our links.

To compile any Android project like a kernel or ROM, developers need to use a toolchain. As per elinux.org, a toolchain is a set of distinct software development tools that are linked (or chained) together by specific stages such as GCC, binutils and glibc (a portion of the GNU Toolchain). Toolchains may contain a debugger or a compiler for a specific programming language as C++ or other. Quite often, the toolchain used for embedded development is a cross toolchain, or more commonly known as a cross compiler. All the programs (like GCC) run on a host system of a specific architecture (such as x86) but produce binary code (executables) to run on a different architecture (e.g. ARM).

The most commonly used toolchain is GCC, initially released almost 20 years ago. A lightly modified GCC is used by Google during the AOSP build process. While Google’s GCC is considered to be the most stable toolchain around, it has some pretty decent competitors like Linaro and SaberMod. These projects are known to boost the overall system performance significantly on many devices. Let’s take a quick look to see the background of these projects.

The Linaro organization was founded in mid 2010 and almost instantly its developers started to work on many projects, including GCC-based toolchains for ARM. Android builds compiled with Linaro started to pop up a few months later. Ever since the Linaro group was founded, users praised it for decent performance improvements and overall snapiness. Linaro uses its own solutions and is constantly updated. You can download the newest version of the toolchain directly from the web page.

A few years later, in 2013, a developer named Paul Beeler created the SaberMod project.  Initially the project was used on SaberMod ROM for the Nexus 7 WiFi model (2013).  This continued onto the Nexus 4 and Nexus 5 through help of user donations.  The toolchains are based on GNU GCC 4.8, 4.9, and 5.0 with AOSP patches forward ported into GNU GCC.  SaberMod also provides extra optimization features unlike Google’s toolchain, which gives options for a few amendments in the ROM itself to add more performance gains, such as graphite loop transformation optimizations. SaberMod tracks other utilities from GNU in the toolchain source components that are generally more up to date than AOSP or Linaro toolchains, and almost always tracks the development branches of GNU GCC for the latest patches and bug fixes.  The toolchain ecosystem of SaberMod is very different from AOSP, using complex scripts to provide quick, up to date toolchains.  Other toolchain sources like the AOSP based toolchain build repository have been heavily modified to work in favor of the way SaberMod toolchains are produced. I have approached some toolchain developers to ask a few questions.

If you could describe SaberMod in one word, what would that be and why?

Joe (frap129): Optimization. I say this because it is our (the SaberMod team’s)  main goal, not necessarily speed. While optimization can provide a great deal of performance and speed boosts, it can also do things such as shrink code or add specific tweaks that allow for better use of a device’s hardware.

A toolchain is not particularly easy to develop. Could you tell me what languages and tools are required to compile a project like SaberMod?

Joe: A lot of programs are required before one even builds a toolchain, just like Android. Things like bison, libpython-dev, the programs you only see in a guide on setting up a build machine to compile a ROM and then forget about. Also like Android, many repos and projects are needed, the main GCC code, BinUtils, GDB, MPFR, and MPC are the bare minimum, but for extra features and performance we add other projects and libraries like GMP, CLooG, ISL, OSL, and Python. This probably all sounds like nonsense, but think of these like the external folder in Android build source, the things in the background that make it work.

Adin (YoshiShaPow): As for languages, development does not require complete fluency of any coding language (though it surely does help a lot). Just knowledge of code structure and basic syntax can help someone produce great work!

Could you tell us why you chose toolchains? And what has been the most difficult situation you have encountered so far?

Paul: Initially I was interested in Linaro toolchain, but found there were quite a few bugs that were not present in AOSP’s toolchains.  So the decision was made to create a new toolchain based strictly on GNU GCC, and AOSP toolchain sources, with Linaro ROM patches for optimizations for jellybean. Thus, SaberMod was born.  More modifications in the toolchains and android system source came in the following years. The most difficult thing was making the toolchains compile similar to how AOSP does, and figuring out what versions of GNU utilities (binutils, gdb etc.) were needed to make the toolchains compile correctly.

SaberMod is not the only project you are working on. Can you tell us something about Hyper Toolchains?

Joe: Hyper Toolchains was originally just a page that I created on GitHub to help organize my own toolchains, so they aren’t just cluttered and thrown in with the rest of my repos, but after I started messing with toolchains more and more, I ended up making things that were quite a bit different from your standard SaberMod, Linaro, or AOSP GCC toolchains. Mixing aspects of Linaro and SaberMod broadened the range of things developers could do solely with toolchains. That’s when I decided to make a thread on XDA, so that devs could have more control over the speed and smoothness of their projects, not just have the speed and responsiveness of SaberMod or the smoothness of Linaro.

SaberMod and Hyper Toolchains are developed by a team of developers. Can you all tell us a little about yourselves?

Paul:  My interest in android started with the G1 nearly 4 years ago.  I had no experience in coding.  I was interested in open source but had no idea where to start on making a ROM or kernel or anything for that matter.  I started with experimenting with android bash scripting for native apps2sdext based on a developers work from firerat.  This allowed more storage for apps which was very limited at the time (500mb for system and apps).  Afterwards I continued this for the Evo shift 4g up until the Nexus 7 when the mod was no longer needed from storage restrictions.  I also started some kernel development with the Evo Shift 4G by including other disk schedulers like BFS which no one else had done for the device at the time.  I continued kernel development to the Nexus 7.  But my kernel development is still considered low other than modifying things here and there to make the kernels compile with SaberMod toolchains, and optimizations.  I currently own a Nexus 5.

Joe: Well, I started working on development stuff a little over 2 years ago with zero experience in coding, Linux, or Android. As a teen who had just upgraded from an old jailbroken iPod to a fancy new first generation Nexus 7, I decided to mess around with Android as much as I could, eventually compiling my own nightly builds with apps, scripts, and mods added. After a while I stopped when my Nexus 7 tragically shattered (RIP in pieces). Once I saved up enough to get a used GS3, I downloaded the latest source, actually got into working with ROM source, and started building a lot of the software on my PC too. I recently got a OnePlus One, which made developing a lot easier and gave me more motivation.

Adin: My first android project was created during the time I had a concussion and was out of school back in April 2014. When I finally got the OK to be on electronics, I decided to try out an android project and ended up making a custom kernel for the Moto G. I also had no knowledge of coding and Linux at the time. Some people say it’s crazy for a 15 year old to be able to do these things, but I see that as motivation to strive for better. With that, Joe and I have created a series of TGM-Hybrid Kernels. I can also solve a 3×3 Rubik’s Cube in 15 seconds on average. My current daily driver is the OnePlus One.

Thank you for your time and good luck with your projects!

SaberMod and Hyper Toolchains can be found on XDA and GitLab. Be sure to take a peek at them if you are planning to release your own custom ROM. What is your favorite toolchain and why? Share your thoughts in the comments below.