- ¶ L4T GNU/Linux Distributions
- ¶ Setting up your SD Card
- ¶ Flashing a distribution for the first time
- ¶ Distributions layout
- Nintendo switch установка linux
- ¶ Updating existing installations (3.x.x/5.x.x)
- ¶ Prerequisites
- ¶ Installation
- ¶ Extras
- ¶ Misc.
- ¶ Credits
- Saved searches
- Use saved searches to filter your results more quickly
- perillamint/switch-linux-guide
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
¶ L4T GNU/Linux Distributions
Various L4T-based linux distributions are available to build.
You can use Jet-Factory to build a distribution for your Switch (still in beta, may not always work).
For official support on desktop based linux distros you can join Linux 4 Switch Official Discord
The state of each distributions available is variable here is a little table reporting the state of it (click on a distro to download):
Distro | State | Version | Official EOL | Description |
---|---|---|---|---|
Ubuntu Bionic | Active | 18.04 | ELTS: 4/2028 | Main L4T distribution maintained by @CTCaer. |
Lakka 4.X | Active | 4.X | — | L4T BSP based port maintained by @gavin_darkglider |
Fedora | Active | 37 | STS: 12/2023 | L4T BSP based port maintained by @azkali. |
Arch | Abandoned | — | — | No support is provided if used. Default user/pass: alarm/alarm |
Ubuntu Focal | Abandoned | 20.04 | — | No support is provided if used. |
Active = Actively supported distribution.
Abandoned = No support, may be broken, please don’t bother devs about these builds they exist for transparency and historical reasons.
¶ Setting up your SD Card
- Insert SD card to your PC
- Download TegraRcmGUI for Windows and run «TegraRcmGUI_vX.X_installer.msi» to install TegraRCMGUI (follow on-screen instructions).
- Launch «TegraRCMGUI» and Install The APX driver if needed. This can be located in «Setting» -> «Install Driver»
- Download Hekate latest release and extract «heakte_ctcaer_X.X.bin»
- Connect your switch to your PC/device via usb cable.
- First, power off your Switch then insert the RCM Jig in the right joycon rail and press/hold VOLUME UP + POWER BUTTON for three seconds to enter into RCM
- Find and select «heakte_ctcaer_X.X.bin» under «Select payload:» and hit «Inject payload». Then your Switch should now be in Hekate bootloader.
¶ Flashing a distribution for the first time
First time Linux installation
-
- Partition the sd card in order to create an ext4 partition.
hekate’s partition manager can be used for that: Tools -> Partition SD Card.
- Partition the sd card in order to create an ext4 partition.
The process in hekate is destructive, so you need to backup your fat partition files (if they are more than 1GB total) or emuMMC.
Move the sliders as you want them and then hit next. You will have plenty of chances/warns to backup your stuff if it’s needed.
- Make sure your Switch is connected via usb to your PC/Device and Select SD UMS
- Extract your distro of choice 7z directly to SD
- Safely unmount and flash via hekate’s Flash Linux
- Then go to Home and Nyx options and dump your joycon BT pairing
- Return to hekate’s Home menu and choose «More Configs»
- Boot
¶ Distributions layout
bootloader |- ini | |- L4T-XXXXXXX.ini |- sys | |- l4t |- bpmpfw_b01.bin |- mtc_tbl_b01.bin |- sc7entry.bin |- sc7exit.bin |- sc7exit_b01.bin switchroot |- install | |- l4t.00 (4092 MiB parts. Last part can be 4 MiB aligned) | |- l4t.01 | |- . | |- l4t.XX |- ubuntu |- boot.scr |- bl31.bin |- bl33.bin |- uImage |- initramfs |- nx-plat.dtimg
Nintendo switch установка linux
Current version: 5.1.1 based on Ubuntu Bionic 18.04 LTS
Note: hekate 6.0.5 v2 or newer MUST be used for this release.
If you need help you can ask in our Discord Server
You should also take a look at our FAQ and Common Issues which may already answer to some of your questions
The important parts of the guide are the Installation and Update sections.
You can skip the rest if you don’t want extra information about the project.
IMPORTANT: The apt repo certificate expired on 2023/04/14.
On existing installations, you will need to run the following commands at least once.
Or if the installation image was downloaded before 2023/04/22, run them after setup.
sudo apt-key del 92813F6A23DB6DFC wget -O - https://newrepo.switchroot.org/pubkey | sudo apt-key add - sudo apt update
¶ Updating existing installations (3.x.x/5.x.x)
If you come from a previous release and need to update.
- In L4T Ubuntu Linux, go to the Software Updater app and click «Install Now»
Or open terminal and execute: sudo apt update && sudo apt-get dist-upgrade .
After update is finished, reboot and done.- If Nvidia BSP was forcefully changed, creating a .reinit file into boot directory will restore Kernel, Kernel Modules and Firmware on the next boot and make the installation working again.
- In case of an update from 3.x.x , uenv.txt will be backed up. If it was manually edited before, README_CONFIG.txt can be followed to restore the custom boot settings inside .ini this time.
¶ Prerequisites
- hekate 6.0.5 v2 or newer
- A 16GB SD Card MINIMUM (Recommended: 128GB and up U3 or U3/A2 class)
- A computer (for backing up and extracting the installation files)
¶ Installation
- Download the base image directly or via torrent from here.
- Backup your SD Card:
- Backup normal files from FAT32 (this also backs up emuMMC if file based)
- If emuMMC raw partition exists, go to hekate -> Tools -> Backup eMMC -> SD emuMMC RAW Partition and back it up (BOOT0/1 and Raw GPP)
- If android exists, do a TWRP backup
4. From your PC, extract the 7z to your SD FAT32 partition. Suggestion: Use hekate UMS ( hekate -> Tools -> USB Tools ) with a USB-C cable connecting your switch and PC to mount your SD card instead of swapping your card from Switch to PC.
5. In Hekate, go to Tools -> Partition SD Card -> Flash Linux.
6. Go to hekate -> Nyx Options -> Dump Joy-Con BT to dump Joycon pairing data, with both Joycon connected to console, after they were paired in hos first.
This must be run even if a Switch Lite is used, since it dumps the calibration data.
- Now you can boot L4T Ubuntu.
Make sure any existing online updates are done via Software Updater or apt command. - After making sure everything is fine, you can now restore your backed up files
- Copy your normal files to FAT32
- For emuMMC use Hekate to restore your backup hekate -> Tools -> Restore eMMC
- For Android, copy your TWRP backup to your FAT32 partition then follow the steps and 4 of our android BUT instead of installing «Lineage zip, followed by your GApps zip» at step 4.g restore your backup in TWRP
¶ Extras
Pairing procons Pair procons by opening the bluetooth menu in settings and pressing the + button in the bottom left corner. Then press the sync button on the controller and select its name in the pairing window.
L4T Megascript Use the L4T-Megascript app, available in your apps list (installed by default in 3.4.0+)
You can get or build various essential stuff, apps or emulators with a single click. All configured and optimized for Switch.¶ Misc.
¶ Credits
CTCaer (kernel/bootloader, distro maintainer, NVENC/NVDEC),
Gavin_Darkglider (distro maintainer),
Azkali (distro maintainer),
Ave (repo management and host),
DanielOgorchock(Switch controller drivers/joycond),
Bylaws,
Langerhans,
Natinusala,
stary2001 (reboot2payload),
NVIDIA (Tegra BSP),
theofficialgman and cobalt2727 (L4T-Megascript),
Everyone else in switchrootSaved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
perillamint/switch-linux-guide
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This guide will help you build f0f’s Linux kernel for your Nintendo Switch and boot into it. I plan on adding more to this guide so you can set up Debian with xfce on your Switch.
Thank you to natinusala on GBAtemp for the original guide and everyone on the Reswitched Discord channel for helping me figure most of this out.
The reason why I’m putting it here is so others will (hopefully) help contribute to this guide.
A computer running Linux (this can be a VM, guide coming soon) USB-3 Port — I’m not sure which O/S requires this (I believe you can get around this with a patch if you are running Linux, but I haven’t tried it) but if you are in a VM you do NOT need a USB 3.0 port.
Clone this repo (with it’s submodules) if you haven’t already:
git clone --recursive --depth=1 https://github.com/nvitaterna/switch-linux-guide.git
This may take a while as some of the submodules are quite large.
After that, cd into the repo:
I will be writing this guide as if we are alway in the repository’s root directory.
Install the following dependencies using your package manager (I did this using debian, you may need more/less when using a different distribution):
build-essential swig python3 python-dev flex bison zlib1g-dev libusb-1.0-0-dev pkg-config bc libssl-dev python3-pip
After those are installed, install pyusb 1.0.0 :
sudo pip3 install pyusb==1.0.0
We will also need a couple toolchains from Linaro. Download aarch64-linux-gnu and arm-linux-gnueabi (for your platform) to the downloads directory.
sudo tar -xf downloads/gcc-linaro-[version]-[platform]_arm-linux-gnueabi.tar.xz -C /usr/share/ sudo tar -xf downloads/gcc-linaro-[version]-[platform]_aarch64-linux-gnu.tar.xz -C /usr/share/
Add the following to the end of your .bashrc file:
export PATH=$PATH:/usr/share/gcc-linaro-[version]-[platform]_aarch64-linux-gnu/bin:/usr/share/gcc-linaro-[version]-[platform]_arm-linux-gnueabi/bin
Now run source ~/.bashrc so these are put into your path.
You may skip this for now, and come back to it later if needed. You can grab the Pixel C image from Google’s Factopry Images Page (direct link. Unzip this to the downloads directory, we will need it later.
unzip downloads/ryu-mxb48j-factory-ce6d5a7b.zip -d downloads/pixel-c-image
Download the firmware-misc-nonfree package from Debian sid to your downloads folder. Extract this to your downloads folder and copy the nvidia directory to /lib/firmware/nvidia/ :
tar -xf downloads/firmware-nonfree_[version].orig.tar.xz -C downloads sudo mv downloads/firmware-nonfree-[version]/nvidia /lib/firmware
Download the Broadcomm Firmware from Chromium’s source code to your downloads folder (direct link)
Make a brcm directory in /lib/firmware and extract the brcm.tar.gz file to /lib/firmware/brcm :
sudo mkdir /lib/firmware/brcm sudo tar -xzf downloads/brcm.tar.gz -C /lib/firmware/brcm
Now that we have all of our dependencies ready, we will start to build the kernel.
Set up the build environment
export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-gnu-
Build the shofel2 exploit
cd bootloader/shofel2/exploit make
cd bootloader/u-boot make nintendo-switch_defconfig make
cd bootloader/coreboot make nintendo_switch_defconfig make iasl make
If you get an error at make , you need the Pixel C Image. Download it if you haven’t already, then run the following (while still in the coreboot directory):
make -C util/cbfstool ./util/cbfstool/cbfstool ../../downloads/pixel-c-image/bootloader-dragon-google_smaug.7132.260.0.img extract -n fallback/tegra_mtc -f tegra_mtc.bin
cd bootloader/imx_usb_loader make
cd bootloader/linux make nintendo-switch_defconfig make
This build may take a while depending on your CPU.
Put your switch in RCM mode, connect it to your computer, and run the following:
Your switch boot to the Linux kernel. If you see Penguins, it worked.