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,
Last edited by Michierusama,
  • Like
Reactions: fr3quency
Hey these are some .bat files for automatic compile and sync: Decrypt9WIP, Luma3DS, FBI and SafeA9LHInstaller. Credits to @DjoeN who shared his Aureinand automatic sync and compiler .bat, I edited that one and made these ones. Kudos @DjoeN

http://www62.zippyshare.com/v/RBwO0RMG/file.html

I have this problem in both cases (It appears when i sync & compile ctrulib and the .bat for Luma3ds)
Sin%20tiacutetulo_zpsn9um95u9.jpg
[/URL][/IMG]
http://i1172.photobucket.com/albums/r575/Paulino_Angulo/Sin tiacutetulo_zpsn9um95u9.jpg

sinttulo856.png

Any help?
 
Last edited by pinguino1234,
Last edited by fr3quency,
  • Like
Reactions: Michierusama
Where ? I don't find it :/
It used to be in the "README.md", but now it seems it redirects to the GitHub page of armips(which means you need to compile it yourself). I am 300km away from home,so I cannot upload my version or compile it. Maybe someone else could do it for you like @astronautlevel (he rocks), but don't hold your breath. People might not have time for such things. :/

When I get home in a week or so, I'll see what changes have been made and update the guide. I don't know if I am able to compile armips and/or I'll have to find a way to compile it and keep the post updated with newer versions.
 
Last edited by fr3quency,
It used to be in the "README.md", but now it seems it redirects to the GitHub page of armips(which means you need to compile it yourself). I am 300km away from home,so I cannot upload my version or compile it. Maybe someone else could do it for you like @astronautlevel (he rocks), but don't hold your breath. People might not have time for such things. :/

When I get home in a week or so, I'll see what changes have been made and update the guide. I don't know if I am able to compile armips and/or I'll have to find a way to compile it and keep the post updated with newer versions.
I have visual studio 2015, but idk why, I can't compil it without error.
 
The images are corrupted. Try to re-upload them on some quality site like imgur jajaja(sorry I had to laugh in Spanish xD)

Jajaja xD. Sorry for the images. I install all again and it works. Before that i get an error about 3DS rules, but now its everething ok. Thanks for the guide :bow:
 
  • Like
Reactions: Michierusama
@fr3quency
Time to update the title of this thread :)

"Tutorial: How to sync-compile Luma3DS"


Anyway i'll post my updated batch files to compile Luma3DS and Luma3DS-DEVELOPER edition

Luma3DS
- You can use REM before the xcopy line OR completly remove it if you don't make a backup of the previous build
- IF you like to make a backup of the previous build -> fill in your own folders after the xcopy command!
- Only the out folder will be backupped with the xcopy command!
- After the backup the previous build will be fully removed! This will always gitclone Luma3DS fully! not update (because i rename the folders)
- To build the MASTER use: build_luma3ds_mst.bat This will rename the Luma3ds folder to Luma3ds_MST after building (reason, i also build the DEVELOPER edition, when building it uses the same folders)
- To build the DEVELOPER use: build_luma3ds_dev.bat This will rename the Luma3ds folder to Luma3ds_DEV after building (reason, i also build the MASER edition, when building it uses the same folders)
- If you want to change the color when done, you can use another color code

Code:
0    =    Black         8    =    Gray
1    =    Blue         9    =    Light Blue
2    =    Green         A    =    Light Green
3    =    Aqua         B    =    Light Aqua
4    =    Red         C    =    Light Red
5    =    Purple         D    =    Light Purple
6    =    Yellow         E    =    Light Yellow
7    =    White         F    =    Bright White

Example:
"COLOR fc"

produces light red on bright white


"build_luma3ds_mst.bat"
Code:
@echo off
Title = Building Luma3DS...
cls
%~d0
cd %~dp0
if exist "Luma3DS_MST" (
    xcopy d:\CFWCN3DS\Luma3DS_MST\out\* d:\#BuildBackups\Luma3DS_MST\ /e /i /y
    rmdir Luma3DS_MST /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
echo Building...
Title = Building Luma3DS ^(Clean^)...
make clean
Title = Building Luma3DS ^(Release^)...
make
Title =  Building Luma3DS ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_MST
echo.
echo Luma3DS folder renamed to Luma3DS_MST
echo.
echo ################################################
color A
echo Done. Files are in the "Luma3DS_MST/out" folder.
cd %~dp0
pause >nul
goto :EOF

"build_luma3ds_dev.bat" (Only line added is: "git checkout developer" to switch to "developer")
Code:
@echo off
Title = Building Luma3DS_DEV...
cls
%~d0
cd %~dp0
if exist "Luma3DS_DEV" (
    xcopy d:\CFWCN3DS\Luma3DS_DEV\out\* d:\#BuildBackups\Luma3DS_DEV\ /e /i /y
    rmdir Luma3DS_DEV /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS_DEV ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
git checkout developer
echo Building...
Title = Building Luma3DS_DEV ^(Clean^)...
make clean
Title = Building Luma3DS_DEV ^(Release^)...
make
Title =  Building Luma3DS_DEV ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_DEV
echo.
echo Luma3DS folder renamed to Luma3DS_DEV
echo.
echo ################################################
echo.
color A
echo Done. Files are in the "Luma3DS_DEV/out" folder.
cd %~dp0
pause >nul
goto :EOF
 
Last edited by DjoeN,
@fr3quency
Time to update the title of this thread :)

"Tutorial: How to sync-compile Luma3DS"


Anyway i'll post my updated batch files to compile Luma3DS and Luma3DS-DEVELOPER edition

Luma3DS
- You can use REM before the xcopy line OR completly remove it if you don't make a backup of the previous build
- IF you like to make a backup of the previous build -> fill in your own folders after the xcopy command!
- Only the out folder will be backupped with the xcopy command!
- After the backup the previous build will be fully removed! This will always gitclone Luma3DS fully! not update (because i rename the folders)
- To build the MASTER use: build_luma3ds_mst.bat This will rename the Luma3ds folder to Luma3ds_MST after building (reason, i also build the DEVELOPER edition, when building it uses the same folders)
- To build the DEVELOPER use: build_luma3ds_dev.bat This will rename the Luma3ds folder to Luma3ds_DEV after building (reason, i also build the MASER edition, when building it uses the same folders)
- If you want to change the color when done, you can use another color code

Code:
0    =    Black         8    =    Gray
1    =    Blue         9    =    Light Blue
2    =    Green         A    =    Light Green
3    =    Aqua         B    =    Light Aqua
4    =    Red         C    =    Light Red
5    =    Purple         D    =    Light Purple
6    =    Yellow         E    =    Light Yellow
7    =    White         F    =    Bright White

Example:
"COLOR fc"

produces light red on bright white


"build_luma3ds_mst.bat"
Code:
@echo off
Title = Building Luma3DS...
cls
%~d0
cd %~dp0
if exist "Luma3DS_MST" (
    xcopy d:\CFWCN3DS\Luma3DS_MST\out\* d:\#BuildBackups\Luma3DS_MST\ /e /i /y
    rmdir Luma3DS_MST /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
echo Building...
Title = Building Luma3DS ^(Clean^)...
make clean
Title = Building Luma3DS ^(Release^)...
make
Title =  Building Luma3DS ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_MST
echo.
echo Luma3DS folder renamed to Luma3DS_MST
echo.
echo ################################################
color A
echo Done. Files are in the "Luma3DS_MST/out" folder.
cd %~dp0
pause >nul
goto :EOF

"build_luma3ds_dev.bat" (Only line added is: "git checkout developer" to switch to "developer")
Code:
@echo off
Title = Building Luma3DS_DEV...
cls
%~d0
cd %~dp0
if exist "Luma3DS_DEV" (
    xcopy d:\CFWCN3DS\Luma3DS_DEV\out\* d:\#BuildBackups\Luma3DS_DEV\ /e /i /y
    rmdir Luma3DS_DEV /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS_DEV ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
git checkout developer
echo Building...
Title = Building Luma3DS_DEV ^(Clean^)...
make clean
Title = Building Luma3DS_DEV ^(Release^)...
make
Title =  Building Luma3DS_DEV ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_DEV
echo.
echo Luma3DS folder renamed to Luma3DS_DEV
echo.
echo ################################################
echo.
color A
echo Done. Files are in the "Luma3DS_DEV/out" folder.
cd %~dp0
pause >nul
goto :EOF
Thank you! Gracias. :)

Sent from my Nexus 5 using Tapatalk
 
C:\Nintendo3DS\Sources\Luma3DS_MST>make
make > armips: Command not found
make: *** [build/patches.h] Error 127

Every time I tried to "make",it's what will happen.I suspect if I put armips and bin2c in a right way.
I extracted them to C:\Nintendo3DS\Programs\devkitPro\devkitARM\bin but failed.
So I extracted them in the original folder,failed again.
Then I put original package,still didn't work.
 
@fr3quency
Time to update the title of this thread :)

"Tutorial: How to sync-compile Luma3DS"


Anyway i'll post my updated batch files to compile Luma3DS and Luma3DS-DEVELOPER edition

Luma3DS
- You can use REM before the xcopy line OR completly remove it if you don't make a backup of the previous build
- IF you like to make a backup of the previous build -> fill in your own folders after the xcopy command!
- Only the out folder will be backupped with the xcopy command!
- After the backup the previous build will be fully removed! This will always gitclone Luma3DS fully! not update (because i rename the folders)
- To build the MASTER use: build_luma3ds_mst.bat This will rename the Luma3ds folder to Luma3ds_MST after building (reason, i also build the DEVELOPER edition, when building it uses the same folders)
- To build the DEVELOPER use: build_luma3ds_dev.bat This will rename the Luma3ds folder to Luma3ds_DEV after building (reason, i also build the MASER edition, when building it uses the same folders)
- If you want to change the color when done, you can use another color code

Code:
0    =    Black         8    =    Gray
1    =    Blue         9    =    Light Blue
2    =    Green         A    =    Light Green
3    =    Aqua         B    =    Light Aqua
4    =    Red         C    =    Light Red
5    =    Purple         D    =    Light Purple
6    =    Yellow         E    =    Light Yellow
7    =    White         F    =    Bright White

Example:
"COLOR fc"

produces light red on bright white


"build_luma3ds_mst.bat"
Code:
@echo off
Title = Building Luma3DS...
cls
%~d0
cd %~dp0
if exist "Luma3DS_MST" (
    xcopy d:\CFWCN3DS\Luma3DS_MST\out\* d:\#BuildBackups\Luma3DS_MST\ /e /i /y
    rmdir Luma3DS_MST /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
echo Building...
Title = Building Luma3DS ^(Clean^)...
make clean
Title = Building Luma3DS ^(Release^)...
make
Title =  Building Luma3DS ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_MST
echo.
echo Luma3DS folder renamed to Luma3DS_MST
echo.
echo ################################################
color A
echo Done. Files are in the "Luma3DS_MST/out" folder.
cd %~dp0
pause >nul
goto :EOF

"build_luma3ds_dev.bat" (Only line added is: "git checkout developer" to switch to "developer")
Code:
@echo off
Title = Building Luma3DS_DEV...
cls
%~d0
cd %~dp0
if exist "Luma3DS_DEV" (
    xcopy d:\CFWCN3DS\Luma3DS_DEV\out\* d:\#BuildBackups\Luma3DS_DEV\ /e /i /y
    rmdir Luma3DS_DEV /s /q
    echo.
    echo removing folder...
)
Title = Building Luma3DS_DEV ^(Clone^)...
echo Cloning repo...
git clone --recursive https://github.com/AuroraWright/Luma3DS.git
cd Luma3DS
git checkout developer
echo Building...
Title = Building Luma3DS_DEV ^(Clean^)...
make clean
Title = Building Luma3DS_DEV ^(Release^)...
make
Title =  Building Luma3DS_DEV ^(Done^)
echo.
cd %~dp0
ren Luma3DS Luma3DS_DEV
echo.
echo Luma3DS folder renamed to Luma3DS_DEV
echo.
echo ################################################
echo.
color A
echo Done. Files are in the "Luma3DS_DEV/out" folder.
cd %~dp0
pause >nul
goto :EOF
Thanks for this, you taught me another way to build a branch using the git checkout :)
I was wondering why you used this way though? Isn't it easier to just do this instead in the git clone line?:
git clone --recursive https://github.com/AuroraWright/Luma3DS.git -b developer

Also, all the bats had the following:
"goto:EOF"

It's not being used anywhere and can be removed :)
 
Thanks for this, you taught me another way to build a branch using the git checkout :)
I was wondering why you used this way though? Isn't it easier to just do this instead in the git clone line?:
git clone --recursive https://github.com/AuroraWright/Luma3DS.git -b developer

Also, all the bats had the following:
"goto:EOF"

It's not being used anywhere and can be removed :)
Yeah, i know about the goto:EOF, i never changed that.
about the -b developer for some reasons unknown that didn't xwork for me (that's what i first tried) so i searched and asked around till i found the git checkout and that worked perfect.
 
  • Like
Reactions: Madridi
Yeah, i know about the goto:EOF, i never changed that.
about the -b developer for some reasons unknown that didn't xwork for me (that's what i first tried) so i searched and asked around till i found the git checkout and that worked perfect.
Thanks, I only built a branch once before, and that was when I was building rxtools a9lh branch using the -b method. Anyway, I learned something new, so thanks :D
 
C:\Nintendo3DS\Sources\Luma3DS_MST>make
make > armips: Command not found
make: *** [build/patches.h] Error 127

Every time I tried to "make",it's what will happen.I suspect if I put armips and bin2c in a right way.
I extracted them to C:\Nintendo3DS\Programs\devkitPro\devkitARM\bin but failed.
So I extracted them in the original folder,failed again.
Then I put original package,still didn't work.
How's your PATH? It should look like that:
VHPmrxq.jpg


The stuff inside the red rectangle are a MUST.
 
  • Like
Reactions: Michierusama
How's your PATH? It should look like that:
VHPmrxq.jpg


The stuff inside the red rectangle are a MUST.
path.png
It's what it looks like in WIN7.
As for the value of Path,this is how I set:C:\Nintendo3DS\Programs\Python27\;C:\Nintendo3DS\Programs\Python27\Scripts;C:\Nintendo3DS\Programs\devkitPro\msys\bin;C:\Nintendo3DS\Programs\devkitPro\devkitARM\bin;C:\Nintendo3DS\Programs\Git\cmd;C:\Nintendo3DS\Programs\MinGW\msys\1.0\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Nintendo3DS\Programs\Git\cmd
 
How's your PATH? It should look like that:
VHPmrxq.jpg


The stuff inside the red rectangle are a MUST.

First of all THANKS for the tut!
Without the kind members of GBAtemp who wrote tut's like that it woud be much harder to get the stuff running ;)

My problem is that the installation of MinGW have the path C:\Nintendo3DS\PROGRAMS\MinGW\
but everything after that is missing from the installation you describe in the OP :(
I have many files installed but not the specified "msys" folder ...... did i do something wrong or have the changed the installation of MinGW ?

(i'am on windows 7 in VMWare)

SykvhHe.png



NEVERMIND!
If you install MinGW you have to chose 2 packages :)
The second one is: msys-base and everything is fine!

Like it that EVERYONE found that out without asking and i'am the first who asked for it!
But anyway thats ONE step thats missing in your NICE tut ;)
 
Last edited by ,
  • Like
Reactions: fr3quency

Site & Scene News

Popular threads in this forum