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,

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
It would be fun to be able to compile Cakes again, cause i have 1 O3DS still setup with CakesFW
Still have one O3DSXL with rxTools A9LH, but i don't know if i stick to it, might aswell use ReiNand A9LH now that it supports O3DS

It's always nice to have different systems each on it's own CFW, this way it's easy to figure out what works on what CFW :)

So @fr3quency , what's next? a tut for ReiNand? ;)

[EDIT]
Maybe doing it like Plailect guide.

Chapter 1:
Seting up your build enviroment
- Windows
- ??? Linux
- ??? Mac-OSX

Chapter 2:
Building/Getting some needed libs
- MakeRom
- Citrus
- Libctru
- Citro3D
- Picasso
- ???
* Where to place all this!

Chapter 3:
Building your CFW:
- Building AuReiNand
- Building ReiNand
- Building rxTools
- Building CakesFW
- ???

Chapter 4:
Building D0k3's and other Tools
- Decrypt9
- Emunand9
- OTPHelper
- GodMode9
- CTRXplorer
- FBI
- ???

Chapter 5:
Building Arm9LoaderHax (A9LH)
- Delebile arm9loaderhax
- Capito27 arm9loaderhax
- SafeA9LHInstaller
- BootCTR9
- ???
 
Last edited by DjoeN,
  • Like
Reactions: fr3quency

Omegapsy

Well-Known Member
Member
Joined
Feb 20, 2012
Messages
124
Trophies
1
XP
826
Country
United States
It would be fun to be able to compile Cakes again, cause i have 1 O3DS still setup with CakesFW
Still have one O3DSXL with rxTools A9LH, but i don't know if i stick to it, might aswell use ReiNand A9LH now that it supports O3DS

It's always nice to have different systems each on it's own CFW, this way it's easy to figure out what works on what CFW :)

So @fr3quency , what's next? a tut for ReiNand? ;)

Actually, following this guide you can just clone and compile ReiNand with no problems
 
  • Like
Reactions: fr3quency

Froster

Your Music Producer
Member
Joined
Sep 6, 2015
Messages
363
Trophies
0
Location
that MIDI sequencer
XP
311
Country
Italy
I'm having some problems...
Every time I run make or use the automatic compile .bat file,it always says that armips is missing,but I have that already in /devkitPro/devkitARM/bin/
What should I do?
 

drfsupercenter

Flash Cart Aficionado
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
I'm not sure if something in the source got changed, but I keep getting errors about missing 3ds.h files...

C:\Nintendo3DS\Sources\AuReiNand>make
ARMIPS Assembler v0.8.0 (Jan 25 2016 00:21:31) by Kingcom
Done.
ARMIPS Assembler v0.8.0 (Jan 25 2016 00:21:31) by Kingcom
Done.
make[1]: Entering directory `/c/Nintendo3DS/Sources/AuReiNand/injector'
fsldr.c
arm-none-eabi-gcc -MMD -MP -MF c:/Nintendo3DS/Sources/AuReiNand/injector/build/fsldr.d -flto -Wall -O2 -mword-relocations -ffast-math -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -Ic:/Nintendo3DS/Sources/AuReiNand/injector/include -I/c/devkitPro/libctru/include -I/c/Nintendo3DS/Sources/AuReiNand/injector/build -DARM11 -D_3DS -c c:/Nintendo3DS/Sources/AuReiNand/injector/source/fsldr.c -o fsldr.o
c:/Nintendo3DS/Sources/AuReiNand/injector/source/fsldr.c:1:17: fatal error: 3ds.h: No such file or directory
compilation terminated.
make[2]: *** [fsldr.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/Nintendo3DS/Sources/AuReiNand/injector'
make: *** [build/patches.h] Error 2

Any ideas?
 

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
I'm not sure if something in the source got changed, but I keep getting errors about missing 3ds.h files...

C:\Nintendo3DS\Sources\AuReiNand>make
ARMIPS Assembler v0.8.0 (Jan 25 2016 00:21:31) by Kingcom
Done.
ARMIPS Assembler v0.8.0 (Jan 25 2016 00:21:31) by Kingcom
Done.
make[1]: Entering directory `/c/Nintendo3DS/Sources/AuReiNand/injector'
fsldr.c
arm-none-eabi-gcc -MMD -MP -MF c:/Nintendo3DS/Sources/AuReiNand/injector/build/fsldr.d -flto -Wall -O2 -mword-relocations -ffast-math -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -Ic:/Nintendo3DS/Sources/AuReiNand/injector/include -I/c/devkitPro/libctru/include -I/c/Nintendo3DS/Sources/AuReiNand/injector/build -DARM11 -D_3DS -c c:/Nintendo3DS/Sources/AuReiNand/injector/source/fsldr.c -o fsldr.o
c:/Nintendo3DS/Sources/AuReiNand/injector/source/fsldr.c:1:17: fatal error: 3ds.h: No such file or directory
compilation terminated.
make[2]: *** [fsldr.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/Nintendo3DS/Sources/AuReiNand/injector'
make: *** [build/patches.h] Error 2

Any ideas?
Did you try to delete the AuReiNand folder(in which you sync AuReiNand CFW) and do a "git clone --recursive https://github.com/AuroraWright/AuReiNand.git"?
 

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
Yeah I deleted it and redownloaded from git, didn't help at all.
That seems weird. Do you have latect libctru compiled from smealum and located in \devkitPro\ as well as makerom.exe (x76 or x64 depending your version) in \devkitPro\devkitARM\bin\ ?

If you followed the guide to the letter, you shouldn't have such a problem. Do you use something that cleans sht and temporary files such as CCleaner? Use it, re-try and report back.
 

drfsupercenter

Flash Cart Aficionado
Member
Joined
Mar 26, 2008
Messages
1,909
Trophies
1
XP
1,163
Country
United States
Yes I do. I'm using a virtual machine so I know nothing weird is going on. I can always try a 32-bit one - I went with x64 because the only makerom I could find at the time was x64...
 

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
I followed it from the start... but I'll try it again on x86 and see what happens. -_-
If it fails, re-try doing the guide from the start. Just skip on the programs you have already installed(such as git, devkitPro etc.) and try re-downloading the small ones(such as VC 2015 in the op, makerom, resync ctrulib and copy the libctru from that etc.)
 

Lumince

Well-Known Member
Member
Joined
Aug 15, 2015
Messages
2,343
Trophies
1
XP
3,748
Country
United States
Yea so after doing this, my cmd prompt no longer sees make as a command... Idk what i did wrong :/ I installed everything to the Nintendo3DS/PROGRAMS folder and went in the environments area and added what was needed and it just tells me its not an internal or external command.
Untitled2.png
 
Last edited by Lumince,

Lumince

Well-Known Member
Member
Joined
Aug 15, 2015
Messages
2,343
Trophies
1
XP
3,748
Country
United States
ctrulib goes inside "\devkitPro\". You didn't follow the guide.
Im stuck in the damn middle dude.... I already had the make command working before i tried this guide. I just couldnt compile AuReinand.... So i did this and now make is not recognized at all. I cant move it if it isnt compiled yet...
Edit- Im here
Untitled2.png
 
Last edited by Lumince,

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
Im stuck in the damn middle dude.... I already had the make command working before i tried this guide. I just couldnt compile AuReinand.... So i did this and now make is not recognized at all. I cant move it if it isnt compiled yet...
Edit- Im here
View attachment 44649
You haven't installed devkitPro and/or MinGW or your PATH doesn't contain the respective locations. You don't improvise, you follow the guide to the letter. And I assure you 20000%, if you followed the guide, you wouldn't face any problems.

Edit: just synced CTRULIB and went to "....\ctrulib\libctru\", typed "make" and it went fine.
 
Last edited by fr3quency,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: lol, Okies. Family graveyard is that way 👉