This guide will assist you through setting up environment to build custom firmwares *nix distributions. As usual, you will need build tools (gcc, ld, etc.) and devkitPRO installed. None of the tools that CFW sources uses on their build scripts (like armips) are currently precompiled for linux on their respective repos, so we'll build each.
[GUIDE] Setting up development environment for compiling custom firmwares on *nix
Building and installing "armips"
[GUIDE] Setting up development environment for compiling custom firmwares on *nix