ArchQueen

How to build Atmosphere 1.9.3

Aug 4th, 2025
185
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.02 KB | None | 0 0
  1. Putting this up for Archival purposes. Credit for guide will be listed.
  2.  
  3. Sometimes you need to build the binaries for Atmosphère, or you want to change something on the source code, for building your starting point should be: https://github.com/Atmosphere-NX/Atmosphere/blob/master/docs/building.md
  4. On that document you can read:
  5.  
  6. BUILDING ATMOSPHERE
  7.  
  8. Building Atmosphère is a very straightforward process that relies almost exclusively on tools provided by the devkitPro organization.​
  9. Dependencies:​
  10. devkitA64
  11. devkitARM
  12. Python 2 (Python 3 may work as well, but this is not guaranteed)
  13. LZ4
  14. PyCryptodome (optional)
  15. Hactool
  16. Setup a DevKitPro environment: (https://devkitpro.org/wiki/Getting_Started)
  17. Install the following packages via (dkp-)pacman:​
  18. switch-dev
  19. switch-glm
  20. switch-libjpeg-turbo
  21. devkitARM
  22. devkitarm-rules
  23. hactool
  24. Install the following library via python's package manager pip, required by exosphere:​
  25. lz4
  26. Finally, clone the Atmosphère repository and run make under its root directory.​
  27.  
  28. Now lets break it down to get it everytime.
  29.  
  30. First you need Install a MSYS environment:
  31. The latest instructions for install the MSYS environment are on https://gbatemp.net/threads/install-msys-environment.652234/ if you don't have one working, use them. (for building and installing dependencies please use Mingw64)
  32.  
  33. After you have the MSYS environment working you need to install DevKitPro
  34. For that you can follow the instructions on the tutorial https://gbatemp.net/threads/setup-a-devkitpro-environment-on-windows.652238/
  35.  
  36. Now you can install DevKitPro packages:
  37.  
  38. You Need base DevKitPro packages:
  39. in mingw64
  40. bash
  41.  
  42. pacman -S --noconfirm switch-dev devkitA64 dkp-toolchain-vars libnx switch-tools switch-mesa switch-libdrm_nouveau switch-sdl2
  43.  
  44. And the Atmosphère prerequisites
  45. Pacman -Sy --noconfirm devkitA64 devkitARM devkitarm-rules hactool mingw-w64-x86_64-python mingw-w64-x86_64-python-lz4 mingw-w64-x86_64-python-pycryptodome switch-dev switch-glm switch-libjpeg-turbo mingw-w64-x86_64-python-pip
  46.  
  47. I had to add zip package because even if wasn't explicit indicated on the build page, the code needs it.
  48.  
  49. You also will need the packages git make lz4 for all to work, use the command:
  50. Pacman -Sy --noconfirm zip git make lz4
  51.  
  52.  
  53. All packages on a combined command:​
  54. pacman -S --noconfirm switch-dev devkitA64 dkp-toolchain-vars libnx switch-tools switch-mesa switch-libdrm_nouveau switch-sdl2 devkitA64 devkitARM devkitarm-rules hactool mingw-w64-x86_64-python mingw-w64-x86_64-python-lz4 mingw-w64-x86_64-python-pycryptodome switch-dev switch-glm switch-libjpeg-turbo mingw-w64-x86_64-python-pip zip git make lz4
  55.  
  56. The package hactool need you to copy your own prod.keys file on $HOME/.switch folder. (c:\msys64\home\USERNAME\.switch if you use the default installation folder)
  57.  
  58. LibNX Dependency
  59. Atmosphère depends heavily on LibNX, generally when a major version of firmware is released or great changes on the code are made, changes to LibNX are also made.
  60. The Atmosphère team works on their own repo of LibNX (https://github.com/Atmosphere-NX/libnx) and forward Pull Request to official SwitchBrew LibNX repo (https://github.com/switchbrew/libnx).
  61.  
  62.  
  63. So ONLY if there are changes on LibNX repository, no yet committed to DevKitPro release, you need to build it and install on your setup.
  64.  
  65. Libnx Build and Install
  66. If you haven't done already, setup the environment variables
  67. You can test it running the command
  68. export
  69. You should have this:
  70. Bash:
  71. export DEVKITPRO=/opt/devkitpro
  72. export DEVKITARM=${DEVKITPRO}/devkitARM
  73. export DEVKITPPC=${DEVKITPRO}/devkitPPC
  74. export PATH=${DEVKITPRO}/tools/bin:$PATH
  75.  
  76. Then go to the Atmosphere-NX/LibNX repo and look what is the new branch for the current firmware, by example, for Firmware 20.3.0 the branch name is "20_Support"
  77.  
  78. (Click the little branch button that says master to select the new branch)
  79. Then go to your MSYS MinGW64 window and clone the Atmosphere-NX/LibNX repo
  80.  
  81. cd ~
  82. git clone --recursive https://github.com/Atmosphere-NX/libnx.git
  83. cd libnx
  84.  
  85. And checkout the needed branch:
  86. git checkout 20_support
  87.  
  88. Then build and install the new LibNX libraries
  89. make install -j$(nproc)
  90.  
  91. Now you can build Atmosphère with latest LibNX code; remember if you update the pacman LibNX package the changes get reversed and you need to build LibNX again.
  92.  
  93. Now is time to build the binaries
  94. Clone the repository:
  95.  
  96. cd ~
  97. git clone --recursive https://github.com/Atmosphere-NX/Atmosphere
  98.  
  99. now
  100. cd Atmosphere
  101.  
  102. Copy prod.keys file on $HOME/.switch
  103. mkdir ~/.switch
  104. cp YOURCURRENTPATHTOKEYS ~/.switch/prod.keys
  105. (use the path for where you placed your keys in place here)
  106.  
  107. Atmosphère is a Python 2 project, even when python 2 has been deprecated by almost 5 years now. some * insist on never update it so as far as that is going, you need to change some files in order to work on python 3, on the files:
  108. Atmosphere\fusee\program\update_mtc_tables.py
  109. Atmosphere\fusee\program\update_sdram_params.py
  110. The function XRANGE must to be changed to RANGE, edit the files and change xrange(  to range( save the files and continue.
  111.  
  112. And now you are ready to start the building process:
  113.  
  114. make -j$(nproc)
  115.  
  116. I do use the "-j$(nproc)" parameter to "bleed" all the available CPU to run the compiler, without that the whole process could take up to 1 hour. Otherwise you can also just use make
  117.  
  118. I want to thank a lot to @binkinator and @godreborn for all the help and inspiration to make this guide, and want to ask you for help improving this guide.
  119.  
  120. Also special thanks to @godreborn for been a support of the users replies and suggestions to the OP.
  121.  
  122. Remember, as you are getting a new set of binaries, you need new set of sigpatches if you use it. So the great tool from @mrdude comes in hand, the latest release can be downloaded from: https://github.com/mrdude2478/IPS_Patch_Creator/releases/; you use the program to generate a new set of patches for your recently build package3 file.
  123.  
  124.  
  125. Latest IPS Patch Creator:
  126. https://gbatemp.net/download/ips-patch-creator-1-5-9.38850/
  127. Original guide by Impeeza
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment