fluxcoil wiki

Howtos, notes and docs

User Tools

Site Tools


My notes on installing Debian on the nintendo switch, as of middle of 2018.


This is bootstrapped from an installed Fedora27.

dnf -y install debootstrap
mkfs.ext4 /dev/mmcblk0p3
mount /dev/mmcblk0p3 /mnt/mmcblk0p3

debootstrap sid /mnt/mmcblk0p3/ http://ftp.jp.debian.org/debian/
cd /mnt/mmcblk0p3/
echo "proc sid-root/proc proc defaults 0 0" >> etc/fstab 
echo "sysfs /sys sysfs defaults 0 0" >> etc/fstab
echo "/dev/mmcblk0p3 / ext4 defaults 0 0" >> etc/fstab
mount proc proc/ -t proc
mount sysfs sys -t sysfs
cp /etc/hosts etc/
cp /etc/hostname etc/
export LC_ALL=en_US.utf8
chroot . /bin/bash

# now in the debian filesystem
apt-get update
# if it fails, mktemp might be missing, can be copied in from host
cp /usr/bin/mktemp /mnt/mmcblk0p3/usr/bin/

mount -t devpts devpts /dev/pts
echo 'deb http://ftp.jp.debian.org/debian sid main contrib non-free' \
echo 'export PATH=/bin:/sbin:$PATH' >>/root/.bashrc
echo 'alias ll="ls -al"' >>/root/.bashrc

apt-get install locales locales-all
apt-get install openssh-server linux-image-arm64 binutils
apt-get install wpasupplicant network-manager
cp /etc/NetworkManager/system-connections/mynet \

# now set a password
# pubkeys should be same as for host
cp -r /root/.ssh/mnt/mmcblk0p3/root/

# modify your switch linux loader, so partition 3 gets started:
# grep mmcblk0p ./shofel2/usb_loader/switch.scr
setenv bootargs 'root=/dev/mmcblk0p3 rw fbcon=rotate:3 rootwait'

ping switch
# login, and do a first functionality test
ssh root@switch
apt-get update; apt-get install bb

Debian Xorg

apt-get install lxde fonts-ipafont-mincho fonts-ipafont-gothic \
  fonts-nanum xfsprogs mesa-utils xfonts-100dpi xfonts-75dpi \
  xfonts-scalable xinput xinit
# now we can bring up X

apt-get install firefox fonts-stix fonts-lmodern xvkbd

Debian compiling dri/mesa

apt-get install git autoconf xutils-dev wget
apt-get install libtool make flex bison build-essential
apt-get build-dep libdrm mesa

git clone git://anongit.freedesktop.org/mesa/drm
cd drm
./configure --enable-tegra-experimental-api --prefix=/usr
make install
cd ..

git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa
# https://github.com/NVIDIA/tegra-rootfs-scripts/blob/master/build-mesa
./configure --prefix=/usr/ --without-dri-drivers \
  --disable-gallium-llvm --with-gallium-drivers=nouveau,tegra \
  --enable-gbm --enable-egl --with-egl-platforms=drm,x11 \
  --enable-gles1 --enable-gles2 --enable-opengl --enable-osmesa \
  --enable-shared-glapi --enable-dri3 --enable-glx --enable-glx-tls \
software/switch/debian.txt ยท Last modified: 2022/11/13 13:06 by