Skip to content

WIP: New device: Nintendo Switch (nintendo-nx)

postmarketOS Bot requested to merge zhuowei:nintendo-nx into master

Unfortunately, this merge request was not imported correctly from GitHub:

source branch does not exist. Please restore it or use a different source branch

Something went wrong while fetching comments. Please try again.

@zhuowei or anyone else: if you have updated the code for another review, please open up a new merge request. Sorry for the trouble.


Created by: zhuowei

This packages Fail0verflow's Nintendo Switch Linux port for postmarketOS.

Wiki page: https://wiki.postmarketos.org/wiki/Nintendo_Switch_(nintendo-nx)

switch_pmos_resized

What works:

  • booting kernel with pmbootstrap flasher boot
  • display (some of the time)
  • mounting root FS
  • starting Weston

What doesn't work:

  • Screen only comes on about half the time. I tried turning the screen on and off again in an initramfs hook, but that didn't help. Seems to be a known bug with Fail0verflow's port, since others have encountered similar issues.
  • USB networking support is not implemented: Failoverflow only managed to get host mode working in Linux. See their Wiki for the challenges of getting gadget mode working.
  • Sometimes the SD card errors out when attempting to mount the filesystem. A reboot fixes it,
  • the Switch's screen is mounted sideways, so Weston displays in portrait instead of landscape on the device. In addition, the touchscreen is calibrated for landscape, so touches go to the wrong place. Fail0verflow's own port uses the "fbcon=rotate:3" option on the kernel cmdline to rotate the fbdev console and X.org, but Weston and pmOS's splash screens ignore these options
  • Wi-Fi, graphics acceleration, and Bluetooth supposedly works in the Fail0veflow port, but I have not tested these (I would need to enable them in the device package first).

Tasks remaining:

  • Figure out how to rotate the screen in Weston
  • See if anyone has a solution to the screen not turning on problem
  • update the Wiki with installation instructions
  • test Wi-Fi/graphics acceleration/Bluetooth
  • Merge on GitHub (see https://postmarketos.org/merge)

See below for questions about specific changes.

Edited by Oliver Smith

Merge request reports