Building from Source
Building from Source
Section titled “Building from Source”This guide explains how to build ryu_ldn_nx from source.
Prerequisites
Section titled “Prerequisites”Using Docker (Recommended)
Section titled “Using Docker (Recommended)”- Docker
- Docker Compose
Native Build
Section titled “Native Build”- devkitPro with devkitA64
- libnx
- Atmosphere-libs (submodule)
- libtesla (for overlay)
Docker Build
Section titled “Docker Build”The easiest way to build is using Docker:
# Clone the repositorygit clone --recursive https://github.com/Ethiquema/ryu_ldn_nx.gitcd ryu_ldn_nx
# Build sysmoduledocker-compose run --rm build
# Build overlaydocker-compose run --rm overlay
# Run testsdocker-compose run --rm testBuild Outputs
Section titled “Build Outputs”After building:
- Sysmodule:
sysmodule/ryu_ldn_nx.nsp - Overlay:
overlay/ryu_ldn_nx_overlay.ovl - Debug symbols:
sysmodule/ryu_ldn_nx.elf
Native Build
Section titled “Native Build”If you prefer building natively:
1. Install devkitPro
Section titled “1. Install devkitPro”Follow the devkitPro getting started guide.
# Install required packagesdkp-pacman -S switch-dev libnx2. Clone Repository
Section titled “2. Clone Repository”git clone --recursive https://github.com/Ethiquema/ryu_ldn_nx.gitcd ryu_ldn_nx3. Build Sysmodule
Section titled “3. Build Sysmodule”cd sysmodulemake -j$(nproc)4. Build Overlay
Section titled “4. Build Overlay”# Install libteslagit clone https://github.com/WerWolv/libtesla.git /opt/libtesla
cd overlaymake LIBTESLA=/opt/libteslaCreating a Release Package
Section titled “Creating a Release Package”To create a release-ready ZIP:
# Build everythingdocker-compose run --rm builddocker-compose run --rm overlay
# Create package structuremkdir -p release/atmosphere/contents/4200000000000010mkdir -p release/switch/.overlays
# Copy filescp sysmodule/ryu_ldn_nx.nsp release/atmosphere/contents/4200000000000010/exefs.nspcp sysmodule/ryu_ldn_nx.npdm release/atmosphere/contents/4200000000000010/main.npdmcp sysmodule/res/*.json release/atmosphere/contents/4200000000000010/cp overlay/ryu_ldn_nx_overlay.ovl release/switch/.overlays/
# Create ZIP (config is generated on first boot)cd release && zip -r ../ryu_ldn_nx.zip .Troubleshooting Build Issues
Section titled “Troubleshooting Build Issues”Submodules not initialized
Section titled “Submodules not initialized”git submodule update --init --recursiveMissing libnx
Section titled “Missing libnx”dkp-pacman -S libnxAtmosphere-libs errors
Section titled “Atmosphere-libs errors”Make sure you have the correct version:
cd sysmodule/Atmosphere-libsgit checkout <required-version>libtesla not found
Section titled “libtesla not found”Set the LIBTESLA environment variable:
export LIBTESLA=/path/to/libtesla