Tutorial Setting up development environment for compiling custom firmwares on *nix

Did it work?

  • Yes, Ubuntu.

    Votes: 1 100.0%
  • Yes, Linux Mint.

    Votes: 0 0.0%
  • Yes, on other Debian derivation.

    Votes: 0 0.0%
  • Yes, on other *nix.

    Votes: 0 0.0%
  • No, on Debian derivation.

    Votes: 0 0.0%
  • No, on other *nix.

    Votes: 0 0.0%

  • Total voters
    1

Pokéidiot

Well-Known Member
OP
Member
Joined
Dec 6, 2015
Messages
244
Trophies
0
Location
\n?
XP
209
Country
Brazil
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.

Newer custom firmwares (like Luma, etc.) requires armips to compile. These executions are on first lines of their makefiles, so typing make without having armips installing will cause the build process to fail and eventually stop. This section will assist you through the process of compiling and installing armips on *nix.
1. Open up a terminal.
2. Make sure to have git installed. We'll clone armips repo. Use the command below.
Code:
git clone --recursive https://github.com/Kingcom/armips.git
3. Once done, we'll enter armips folder. You will see that there's no makefile in there, but we'll build one from the CMakeLists.txt file present in there.
Code:
cd armips
cmake CMakeLists.txt
4. The process should be near instant. After that, build armips by typing
Code:
make
5. Time to install it. If you don't do, you will not be able to use it from any folder. We will put it into our devkitARM bin folder. This will require superuser permission, so make sure to have in mind your su password.
Code:
sudo cp ./armips /opt/devkitpro/devkitARM/bin
6. You now have armips installed. You can run it from anywhere.

makerom is needed to compile CFW, still useful to build CIAs from ARM11 homebrew.
1. Open up a terminal.
2. Make sure to have git installed. We'll clone profi200's Project_CTR repo. Use the command below.
Code:
git clone --recursive https://github.com/profi200/Project_CTR.git
3. Once done, enter Project_CTR folder. There will be 2 folders, ctrtool and makerom. We'll compile only makerom.
Code:
cd Project_CTR
cd makerom
make
4. Wait building to be complete. Once done you will end up with the "makerom" exec on the folder, ready to be used.
5. We'll install it under our devkitARM bin folder, and again, this requires superuser. Remember your su password!
Code:
sudo cp ./makerom /opt/devkitpro/devkitARM/bin
6. You now have makerom installed. You can run it from anywhere.
* If you want ctrtool, repeat step 3 to 6 by using ctrtool instead of makerom.

bin2c is a tool of which create C sources from binary files. Required to build CFW but it's also useful to hardcode binaries into code.
* bin2c isn't on github, it's on sourceforge. Get it from there.
1. You will end up with a zip file once finished download. In it should be a C script. Extract it in a folder.
2. Open up a terminal and change directory to the folder that you placed bin2c.c.
3. Done that, compile bin2c.c to bin2c.
Code:
gcc bin2c.c -o bin2c
4. This should be near instant. You will end up with a fresh bin2c binary.
5. As usual, install it on devkitARM bin. This isn't really for ARM but still... yeah. superuser permissions required, as usual.
Code:
sudo cp ./bin2c /opt/devkitpro/devkitARM/bin
6. You now have bin2c installed. You can run it from anywhere.

Now that you have all things needed installed, your *nix is now ready to compile custom firmwares. Some of them may require other tools, but this guide only covers what's needed to build the simple things (luma3DS and derivations should build with no problems).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    I don't wanna go to the store someone go for me
  • BigOnYa @ BigOnYa:
    Call my wifey, tell her pick up stuff on her way over.
  • K3Nv2 @ K3Nv2:
    Pick up my door dash meat me in the allyway
    +1
  • BigOnYa @ BigOnYa:
    Wifey is busy, so ill send my buddy @AncientBoi , in his gimp outfit. "who ordered the 6" sausage?""
  • K3Nv2 @ K3Nv2:
    Like subway it's false advertising
    +1
  • BigOnYa @ BigOnYa:
    Ok "who ordered the Vienna sausage?"
  • K3Nv2 @ K3Nv2:
    Uremum
    +1
  • BigOnYa @ BigOnYa:
    My buddy convince me to download and play poker game with him yesterday, called Four Kings Casino, its pretty fun actually, you create a avatar and walk around in a virtual casino, and play any table, or slots with others online.There's even a dance club and bowling alley.
  • SylverReZ @ SylverReZ:
    They should bring advertisements like this back LOL.
  • BakerMan @ BakerMan:
    or that german ninja turtle commercial
    +1
  • K3Nv2 @ K3Nv2:
    Forgot to buy BBQ sauce at the store so made my own ffs
  • RedColoredStars @ RedColoredStars:
    Blues Hog BBQ sauces are pretty good.
  • K3Nv2 @ K3Nv2:
    My insurance has a thing where if I do a virtual visit they'll just send me a $100 gift card to Walmart I'm about to sell a company my medical history for $100 lol
  • BigOnYa @ BigOnYa:
    My insurance has a thing called, " Nope, we aren't paying for that." that they like to use on us all the time. Then we play the "Ok we will go to some other insurance company." then they miraculously say ok we will pay for that.
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    Well look at what the cat dragged in!!!
  • BigOnYa @ BigOnYa:
    Hey, do you feel any older?
  • K3Nv2 @ K3Nv2:
    No I don't
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, not right now
    +1
  • BigOnYa @ BigOnYa:
    @K3Nv2 That's my phrase, stop it
    +1
  • K3Nv2 @ K3Nv2:
    Your phrase is I'm not drunk
    +1
  • Xdqwerty @ Xdqwerty:
    I feel a discomfort in my throat
  • SylverReZ @ SylverReZ:
    BigOnYa after a long day.
    SylverReZ @ SylverReZ: BigOnYa after a long day.