Tutorial  Updated

How to Sync & Compile Luma3DS

There were some users that wanted to compile Luma3DS themselves but run into problems. There is already a guide that explains how to sync and compile rxTools, so most of the stuff here is stolen from this guide: https://gbatemp.net/threads/noob-proof-guide-to-compile-rxtools-source.392242/ (thanks btw @capito27. Your guide helped me compile rxTools back then and made me understand some of this shi-- stuff. :P).

I try to keep the guide simple is both glossary/terms and images. That means I will use the same picture over and over as well as the same sentence to keep it noob-friendly.


Follow the guide TO THE LETTER. Double check and triple check. IT JUST WORKS!™
Seriously, if it won't work with the first try you did something wrong. "You're holding it wrong™".


So, you want to sync & compile Luma3DS. Here's what you have to do:



Start here:
  1. Navigate to "C:\" and create a new folder with the name "Nintendo3DS" or whatever you like. Now open this folder that you created.
    !!!!!!!!!! TIP: Don't add spaces in THAT folder's name. For example: if you want the folder to be named "Nintendo 3DS" then you will have to name it "Nintendo3DS" or "Nintendo_3DS(the difference is that there is NO space) !!!!!!!!!!

  2. Create 2 new folders inside with the names "Programs" and "Sources"
    Programs = the folder in which you install all the needed programs
    Sources = the folder in which you will sync the code.
    It should look like this:
    0m09obS.jpg


    !!!!!!!!!! Now install all of the following programs to "C:\Nintendo3DS\Programs" !!!!!!!!!!

  3. Download Git for your operating system from here: https://git-scm.com/downloads (When you install it, just click on "Next" to everything it says).

  4. Download latest Python 3.x from here: https://www.python.org/downloads/

  5. Install devkitPro from here: https://sourceforge.net/projects/devkitpro/

  6. Download MinGW from here: https://sourceforge.net/projects/mingw/ When installation is over, it will show you a window and ask you which package to install. Choose "mingw32-base" and "msys-base", wait for the installation to finish and close the window.

  7. After you are done installing the programs from STEP 3, 4, 5 & 6, your "C:\Nintendo3DS\Programs" should look like this:
    u0xe5hs.png


  8. Go to Luma3DS's GitHub page which can be found here: https://github.com/AuroraWright/Luma3DS and download "armips" from the description at the bottom. (If you're clueless, just press on your keyboard CTRL+F and type "armips").
    Place the file inside "C:\Nintendo3DS\Programs\devkitPro\devkitARM\bin"

  9. Download Visual C++ Redistributable 2015 x86 (EVEN IF YOU HAVE A x64(64-bit) OS) from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=48145

  10. Download the latest MAKEROM.EXE for your OS from here: https://github.com/Steveice10/buildtools/tree/master/3ds, rename it to just "makerom.exe" and paste it in "C:\Nintendo3DS\Programs\devkitPro\devkitARM\bin"

  11. You will have to edit your PATH. Don't freak out, it's easy:
    Right click on your Computer ICON --> Properties --> Advanced system settings --> Environment Variables... --> System variables --> FIND "Path" --> Edit.
    If you did it right, you should be looking at this window:
    WtSoNQG.png


    Now add the locations that are inside the red rectangle THEY HAVE TO BE AT THE TOP!

  12. Navigate to "C:\Nintendo3DS\Sources\" - As I said at the beginning of the guide, this is the folder that we will sync in everything we need in order to compile Luma3DS (Luma3DS will also be synced in this folder)

  13. We need to sync & compile CTRULIB first.

  14. On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg


  15. Now type "git clone --recursive https://github.com/smealum/ctrulib.git"
    This is how it should look like:
    FnrpK09.jpg


  16. Navigate to "C:\Nintendo3DS\Sources\ctrulib\libctru"

  17. On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg


  18. Now simply type "make" and wait to compile.
    This is how it should look like:
    0WCy9eK.jpg


  19. Navigate to "C:\Nintendo3DS\Sources\ctrulib" and COPY the folder with the name "libctru"
    This is how it looks like:
    8tl66hU.jpg


  20. Navigate to "C:\Nintendo3DS\PROGRAMS\devkitPro". In here, you will see an OLDER version of the "libctru" folder. First rename this folder to "OLD_libctru" and THEN paste the folder you had previously copied.
    If you did it right, you must be looking at this:
    1IWTNSS.png


  21. Go back to "C:\Nintendo3DS\Sources\". You will have to sync firmtool. https://github.com/TuxSH/firmtool
    On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg
  22. Now type "git clone --recursive https://github.com/TuxSH/firmtool"
    Open the folder you just synced. On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg
  23. Now type "pip install cryptography" and when it's done type "pip install git+https://github.com/TuxSH/firmtool.git"
  24. Navigate to 'C:\Nintendo3DS\Sources"
    It time to sync Luma3DS. You're 95% done.

  25. On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg


  26. Now type "git clone --recursive https://github.com/AuroraWright/Luma3DS.git", press enter and wait for it to sync the sources.
    This is how it should look like:
    9aoQ11K.png


  27. After it is done, you will see a newly created folder named "Luma3DS". Open this new folder.
    This is how it should look like:
    tvNBEBv.png


  28. On your keyboard press SHIFT and right click with your mouse. The right click context menu will show you a new option "Open command window here". Click it.
    This is how it should look like:
    2NHmU8f.jpg


  29. Now simply type "make" and wait for it to do its job.
    This how it should look like:
    VFOyBSW.jpg


  30. After you type the "make" command, you will see a NEW folder named "out" inside Luma3DS's folder(C:\Nintendo3DS\Sources\Luma3DS\out)
    This is how it looks like:
    JqntHlx.jpg




Congratulation, you have successfully compiled Luma3DS! Now transfer the boot.firm file that you FINALLY created to your 3DS and have fun. :)

Credits go to @Aurora Wright for creating Luma3DS, @TuxSH, @Supster131, @astronautlevel and @Madridi for helping me out with every noob question I had and, of course, @capito27 for creating the original guide to compile rxTools(it really really helped me and sparked my desire to learn about all this stuff. Thanks a lot @capito27 !). And of course to all those that have helped build what we have now on our 3DS systems. If anyone feels I left them out, PM me so I can add your name here. <3




-----------> This guide can also be used to compile GodMode9/Decrypt9/SafeB9SInstsller if you ever wish to do so; you just need to replace the git page with the one where GodMode9/Decrypt9/SafeB9SInstsller is found in.
 
Last edited by fr3quency,

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Nice tutorial @fr3quency, although I would change "make" to "make install" for libctru. No need for copying and what not.

And yeah I have tons of scripts (based on the ones created by @WhoAmI? that @DjoeN shared). Only reason why I haven't shared them is because each project have different requirement (like CTRXplorer needs citrus..) so the scripts are useless without the pre-req.
 
Last edited by Madridi,

fr3quency

Well-Known Member
OP
Member
Joined
Jan 11, 2016
Messages
811
Trophies
0
Age
32
Location
Wherever my imagination decides.
Website
fr3quency.deviantart.com
XP
823
Country
Greece
Nice tutorial @fr3quency, although I would change "make" to "make install" for libctru. No need for copying and what not.
Thanks. :D I was thinking the same, but the libctru folder that comes pre-installed with devkitPro has less files than the one you compile from master. So I thought it'd be better to copy the synced one just to be on the safe side. :P
 
  • Like
Reactions: Madridi

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Thanks. :D I was thinking the same, but the libctru folder that comes pre-installed with devkitPro has less files than the one you compile from master. So I thought it'd be better to copy the synced one just to be on the safe side. :P
I deleted that all together and just "make install" the new one :P
Also overwrote Piccasso.exe with the latest one. No sense keeping useless folders/files, especially since I already have another libctru folder renamed to something else (Steveice10's libctru branch for compiling FBI, Smea's branch won't work)

Edit: Picasso is for CTRXplorer, not Aureinand, just so people are not confused..
 
Last edited by Madridi,

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
SO that's why FBI doesn't compile :P it needs steveice10's own libctru branch :)

Anyway i have seperate scripts for every homebrew app we can compile.
But i also have one batch file when run builds all D0k3's homebrew apps in 1 go
(ctrxplorer/decrypt9WIP/emunand9/otphelper/godmode9)
- Same for ReiNand, 1 batch file that builds the N3DS and O3DS in 1 go
- Same for rxTools, 1 batch that builds the normal rxTools and A9LH version in 1 go

Still figuring out how to compile CakesFW it seems like it doesn't like to be build on a Windows / Python 3.4 only .PyYaml config :/
 

fr3quency

Well-Known Member
OP
Member
Joined
Jan 11, 2016
Messages
811
Trophies
0
Age
32
Location
Wherever my imagination decides.
Website
fr3quency.deviantart.com
XP
823
Country
Greece
SO that's why FBI doesn't compile :P it needs steveice10's own libctru branch :)

Anyway i have seperate scripts for every homebrew app we can compile.
But i also have one batch file when run builds all D0k3's homebrew apps in 1 go
(ctrxplorer/decrypt9WIP/emunand9/otphelper/godmode9)
- Same for ReiNand, 1 batch file that builds the N3DS and O3DS in 1 go
- Same for rxTools, 1 batch that builds the normal rxTools and A9LH version in 1 go

Still figuring out how to compile CakesFW it seems like it doesn't like to be build on a Windows / Python 3.4 only .PyYaml config :/
I get a strange error trying to compile CTRXplorer. (I'm using smea's git)
All of the "output" files are compiled correctly except \output\CTRXplorer.ZIP:

HqwVHXh.png


yZs8F53.png



The only difference between steve's and smea's (apart from steve's repo is 25 commits behind smea's) is this commit found ONLY in steve's repo: https://github.com/Steveice10/ctrulib/commit/932630764f04ee2b6f510fe69bb8db1249f1f541
 
Last edited by fr3quency,

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
I get a strange error trying to compile CTRXplorer. (I'm using smea's git)
All of the "output" files are compiled correctly except \output\CTRXplorer.ZIP:

HqwVHXh.png


yZs8F53.png



The only difference between steve's and smea's (apart from steve's repo is 25 commits behind smea's) is this commit found ONLY in steve's repo: https://github.com/Steveice10/ctrulib/commit/932630764f04ee2b6f510fe69bb8db1249f1f541
whats this zip it's trying to use? I mean what's the source of it? I can send you the ones I use if you want to try
 
Last edited by Madridi,

Omegapsy

Well-Known Member
Member
Joined
Feb 20, 2012
Messages
124
Trophies
1
XP
826
Country
United States
I have all the pre reqs and all my paths are correct (I think) but it still wont compile for me.

Here is a look at my path:
a84309a7e5.png


Is there something I did wrong? And I also didn't see a point of uninstalling ALL my things to reinstall them in one folder. However, I may still do this in the future.
 

fr3quency

Well-Known Member
OP
Member
Joined
Jan 11, 2016
Messages
811
Trophies
0
Age
32
Location
Wherever my imagination decides.
Website
fr3quency.deviantart.com
XP
823
Country
Greece
whats this zip it's trying to use? I mean what's the source of it? I can send you the ones I use if you want to try
Reading the error message in CMD, I realized I needed a zip.exe. I downloaded a "ZIP" package from MinGW but alas the error persists. (the 2 images I posted above have that "ZIP" package I downloaded). Did you have to download anything else apart from "mingw32-base"?



I have all the pre reqs and all my paths are correct (I think) but it still wont compile for me.

Here is a look at my path:
a84309a7e5.png


Is there something I did wrong? And I also didn't see a point of uninstalling ALL my things to reinstall them in one folder. However, I may still do this in the future.
Your path is fine but put "C:\Program Files\Git\cmd" and "C:\Program Files\Git\bin" UNDER C:\minGW\bin. This is because "Program Files" contains a space in its name. devkitPro is the only program I can think of having errors because of that, but it doesn't hurt to be on the safe side.
 
Last edited by fr3quency,

Omegapsy

Well-Known Member
Member
Joined
Feb 20, 2012
Messages
124
Trophies
1
XP
826
Country
United States
Reading the error message in CMD, I realized I needed a zip.exe. I downloaded a "ZIP" package from MinGW but alas the error persists. (the 2 images I posted above have that "ZIP" package I downloaded). Did you have to download anything else apart from "mingw32-base"?




Your path is fine but put "C:\Program Files\Git\cmd" and "C:\Program Files\Git\bin" UNDER C:\minGW\bin. This is because "Program Files" contains a space in its name. devkitPro is the only program I can think of having errors because of that, but it doesn't hurt to be on the safe side. :P

EDIT: Still failed at compiling the injector.
 
Last edited by Omegapsy,

fr3quency

Well-Known Member
OP
Member
Joined
Jan 11, 2016
Messages
811
Trophies
0
Age
32
Location
Wherever my imagination decides.
Website
fr3quency.deviantart.com
XP
823
Country
Greece
Done, will test now
Nice, report back with results. Also I forgot to answer your last question. No, there is no point in uninstalling your programs. I re-worked the tutorial from scratch, so I though it'd be better(in general as well) to have all of the needed programs in one folder.
 
Last edited by fr3quency,

Omegapsy

Well-Known Member
Member
Joined
Feb 20, 2012
Messages
124
Trophies
1
XP
826
Country
United States
Nice, report back with results. AlsoI forgot to answer your last question. No, there is no point in uninstalling your programs. I re-worked the tutorial from scratch, so I though it'd be better(in general as well) to have all of the needed programs in one folder.

As stated above. Compile still fails at compiling the injector.
 

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Reading the error message in CMD, I realized I needed a zip.exe. I downloaded a "ZIP" package from MinGW but alas the error persists. (the 2 images I posted above have that "ZIP" package I downloaded). Did you have to download anything else apart from "mingw32-base"?
I didn't use Mingw to begin with. You need "infozip".. d0k3 posted it in the ctrxplorer thread somewhere in the last few posts. Download that and add it to path and it should work fine :)

--------------------- MERGED ---------------------------

As stated above. Compile still fails at compiling the injector.
Compiling the injector failure will be mostly one of 2 things:
- You don't have the correct/latest makerom.exe
- You don't have the correct/latest libctru (Smea's branch)
 

fr3quency

Well-Known Member
OP
Member
Joined
Jan 11, 2016
Messages
811
Trophies
0
Age
32
Location
Wherever my imagination decides.
Website
fr3quency.deviantart.com
XP
823
Country
Greece
As stated above. Compile still fails at compiling the injector.
Check step 10 in the guide. You need MAKEROM.exe for your OS(if you have x86, then download the x86 build; if you have x64, then download the x64 build)

Edit: and as stated above you need the latest libctru. ninja'd
 

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
I thought you knew :P

It however crashes when building the .3dsx .. Not sure why but I believe it's a windows 7 issue (based on 3 tests, 3 different people. Crashed with windows 7 on 2 Other PCs.) Whether that was a coincidence or not I have no idea

whats this zip it's trying to use? I mean what's the source of it? I can send you the ones I use if you want to try

Never really looked close into building FBI, so i didn't know,
Anyway, like said, to busy figuring out building CakesFW, think i'll setup an old laptop with linux, just need to figure out what branch of linux to use :P
 

Omegapsy

Well-Known Member
Member
Joined
Feb 20, 2012
Messages
124
Trophies
1
XP
826
Country
United States
I didn't use Mingw to begin with. You need "infozip".. d0k3 posted it in the ctrxplorer thread somewhere in the last few posts. Download that and add it to path and it should work fine :)

--------------------- MERGED ---------------------------


Compiling the injector failure will be mostly one of 2 things:
- You don't have the correct/latest makerom.exe
- You don't have the correct/latest libctru (Smea's branch)

Check step 10 in the guide. You need MAKEROM.exe for your OS(if you have x86, then download the x86 build; if you have x64, then download the x64 build)

Edit: and as stated above you need the latest libctru. ninja'd


I have the latest makerom. It was libctru that was causing my problems. I guess I had a fork that WASN'T Smea's. Thanks for the help!!
 
  • Like
Reactions: Madridi

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Never really looked close into building FBI, so i didn't know,
Anyway, like said, to busy figuring out building CakesFW, think i'll setup an old laptop with linux, just need to figure out what branch of linux to use :P
Lol that's one of the reasons I'm not getting into Linux. It seems it'll require a lot of brain activity to figure out what's the best one to use :P

Last time I used Linux was 11 years ago in Robotics class. Things obviously changed since then :P

I for one am hoping @mid-kid just reverts back to Python 2.7.x .. Not sure if changing to Python 3 was a necessity or "just because"
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.