How to Use DevkitPro to Build CFW in Windows

A video tutorial can be found here:


Steps:

Grab devkitpro here: https://github.com/devkitPro/installer/releases

Grab Cygwin here: https://cygwin.com/install.html

Go to PC properties > Advanced system settings > Environment variables > add ;C:\devkitPro\devkitA64\bin and press OK


Now download ReiNX here: https://github.com/Reisyukaku/ReiNX

Extract the zip to your desktop

Open cmd and run the following commands:


cd desktop

cd ReiNX-master

make

Now open the ReiNX-master folder you extracted to your desktop and you'll find an 'out' folder which contains the compiled files you need on your SD card

You will need a way to inject the ReiNX.bin to your Switch. In my case I use TegraRCM which can be downloaded here:
https://gbatemp.net/threads/tegrarcmgui-simple-gui-for-tegrarcmsmash.503510/

Now all you have to do is open the TegraRCMGUI.exe and locate the ReiNX.bin file, connect your Switch to your PC (RCM Mode) and inject the payload to your Switch.

If TegraRCM doesn't detect your Switch you may need to install the APX drivers from here and make sure to install the libusk 3.0.7.0 drivers:
https://zadig.akeo.ie/

After you injected the .bin file your Switch should boot the CFW :)



Included in the attachment is a compiled version of ReiNX for those that don't want to compile :)
 

Attachments

  • rei.zip
    542.8 KB · Views: 299

shchmue

Developer
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
I figured out what keeps this from working. you need to add devkitPro/devkitARM/bin to path to get it to make or else it just limply fails to run arm-none-eabi-gcc with no error

in MSys2:
Code:
export PATH=$PATH:/c/devkitPro/devkitARM/bin

then navigate to the ReiNX folder and make
 

natinusala

Win32 error 31 is not an error
Member
Joined
Dec 1, 2012
Messages
1,032
Trophies
0
Age
44
XP
2,914
Country
France
If you use msys2, as Windows devkitpro was intented to be used with, you shouldn't need to mess with the path
 

shchmue

Developer
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
I installed it with the devkitpro installer for windows. devkitarm/bin isn't on the path and it shouldn't be or else it'd screw up builds that use a64 instead. maybe something conditional for Windows users in the Makefile would do the trick

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

How you get msys
the devkitpro installer installs it
 

Mikep90

Well-Known Member
Member
Joined
May 29, 2018
Messages
274
Trophies
0
Age
41
XP
1,852
Country
United States
Im getting the same error.
Something is missing in the guide.
Anyone can help?
(in my case i placed the unzipped in C:

C:\ReiNX-master>make
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc -march=armv4t -mtune=arm7tdmi -mt
humb -mthumb-interwork -Os -nostdlib -ffunction-sections -fdata-sections -fomit-
frame-pointer -fno-inline -std=gnu11 -c src/fs.c -o build/fs.o
make: *** [Makefile:50: build/fs.o] Error 1
I'm getting the same error how I fix it
 

Mikep90

Well-Known Member
Member
Joined
May 29, 2018
Messages
274
Trophies
0
Age
41
XP
1,852
Country
United States
for CMD run this then make. fix the devkirpro path if yours is different.
Code:
set PATH=%PATH%;c:/devkitpro/devkitarm/bin

Thanks that fix my problem

How will i fix this if you could help me please

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

Thanks that fix my problem

How will i fix this if you could help me please

C:/Users/popey/Desktop/FreeShopNX-master/Sources/UI.h:2:10: fatal error: SDL2/SDL.h: No such file or directory
#include <SDL2/SDL.h>
 

masterzed

Well-Known Member
Member
Joined
Oct 31, 2015
Messages
108
Trophies
0
Age
43
XP
246
Country
Gambia, The
anybody a solution for this:
c:\devkitPro\msys2\ReiNX-master>make
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork -Os -nostdlib -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -fno-builtin -std=gnu11 -c src/fs.c -o build/fs.o
make: /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc: Command not found
make: *** [Makefile:51: build/fs.o] Error 127
 

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
I figured out what keeps this from working. you need to add devkitPro/devkitARM/bin to path to get it to make or else it just limply fails to run arm-none-eabi-gcc with no error

in MSys2:
Code:
export PATH=$PATH:/c/devkitPro/devkitARM/bin

then navigate to the ReiNX folder and make

Thanks did the trick! Worked on windows 10

1- Install DevkitPRO *Note don't just select switch, do all

2- Go to C:\devkitPRO\msys2 and double click "msys2_shell.cmd"

3- In msys2 cmd enter "export PATH=$PATH:/c/devkitPro/devkitARM/bin". Press enter. *Note thanks @shchmue

4- Now type "CD c:\PATH\to\ReiNX-master" *Note enter "CD" then press spacebar. Then DRAG the ReiNX-master folder into cmd shell. Press enter.

5- Type "make"

6- Build will be in "ReiNX-master\out" folder
 
  • Like
Reactions: mezz0 and shchmue

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,813
Trophies
2
Age
48
Location
Japan
XP
3,729
Country
United States
Let people use what they want. If you know so much why don't you make a tut instead of going around criticising everything
Because the devkit team already has a tut and wants you to use msys2? Telling people to use shit that is not the standard, is what causes issues with building and phantom bugs in the compiled binaries. It's hell for the actual developers. So how about you not snapping off on people without having a damn clue yourself?

And Windows will always have problems with the path depending on what other stuff you've installed in the past. VC distribution binaries, cygwin, mingw, gcc, etc... If nothing of the sort is in your path when you first install devkit, and use msys2 as intended, it works without issue. On the other hand, using virtualbox and a Linux VM like ubuntu or mint, will work for anything except Windows and iOS binaries. Only a couple of other steps to know to make Windows binaries compile as well. iOS... hell, I don't even like xcode. I install it in a OS X VM, then use a command line for that stuff anyway...
 
Last edited by urherenow,

shchmue

Developer
Developer
Joined
Dec 23, 2013
Messages
791
Trophies
1
XP
2,367
Country
United States
yeah i didn't expect this not to work without fixing the path, but i clean reinstalled my OS recently and there was nothing linux-related on the PATH or installed at all before i installed devkitPro. and yep, VM is easiest if your computer can handle it.
 

Mikep90

Well-Known Member
Member
Joined
May 29, 2018
Messages
274
Trophies
0
Age
41
XP
1,852
Country
United States
error: invalid conversion from 'u64' {aka 'long unsigned int'} to 'Mutex' {aka 'int'} [-fpermissive] return condvarWaitTimeout(&cv, timeout); ^~~ C:/Users/Mike/Desktop/Bat_Files/ReiNX/NX_Sysmodules/libstratosphere/include/stratosphere/hossynch.hpp:57:51: error: too few arguments to function 'Result condvarWaitTimeout(CondVar, Mutex, u64)' return condvarWaitTimeout(&cv, timeout);
i get that all threw the whole compiling
 

blady83

Member
Newcomer
Joined
Oct 29, 2017
Messages
18
Trophies
0
Age
40
XP
211
Country
Venezuela
Greetings to all, I am trying to install the devkitpro and it gives me the following error your internet connection seems to be not allowed or dropped out, can you help me
 

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
530
Trophies
0
XP
929
Country
Bulgaria
can anyone help me fix this error

x0): multiple definition of `sd_power_cycle_time_start'; build/bootloader.o:(.bss.sd_power_cycle_time_start+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:93: build/ReiNX.elf] Error 1
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://wccftech-com.cdn.ampproject.org/v/s/wccftech.com/amd-ryzen-granite-ridge-zen-5-desktop-cp...