Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this project support a jailbroken Nintendo Switch? #688

Open
AndersonTorres opened this issue Mar 3, 2024 · 9 comments
Open

Can this project support a jailbroken Nintendo Switch? #688

AndersonTorres opened this issue Mar 3, 2024 · 9 comments
Labels
4. type: port New device port 4. type: question Further information is requested

Comments

@AndersonTorres
Copy link

AndersonTorres commented Mar 3, 2024

Hello!


In my megalomaniac mind, I think: "If Linux then Nix".
When I see a cool project that either

  • runs on Linux (any package in Debian AUR Slackbuilds Gentoo Nixpkgs)
  • runs Linux on (e.g. a cellphone)

my first thought is "what about running this on Nix?".


Recently I bought a jailbroken Nintendo Switch OLED.

Since there is a Fedora Linux that runs on Nintendo Switch, so I ask: is it possible to port mobile-nixos to my Nintendo Switch?

@AndersonTorres AndersonTorres changed the title Can this project support Nintendo Switch? Can this project support a jailbroken Nintendo Switch? Mar 3, 2024
@samueldr
Copy link
Member

samueldr commented Mar 3, 2024

Almost definitely yes.

It just requires to put the time into making it work.

(NOTE: I literally have a spare early model switch set aside for that purpose, but never got around to it...)

@AndersonTorres
Copy link
Author

I am very interested, then!
Please tell me how can I help - and what I should know in order to help :)

@samueldr samueldr added 4. type: question Further information is requested 4. type: port New device port labels Mar 4, 2024
@samueldr
Copy link
Member

samueldr commented Mar 4, 2024

First, I'll note that I won't have the time or energy to handle that in any predictable time frame. Though I can answer precise questions.

So, I guess the first thing I would do is learn about all the components involved into booting the kernel and initrd/stage-1, and make a strong mental model.

Since you'll maybe need some help, you should probably make a write-up so one can follow your mental model.

When I say learn about all the components, this would map what basically is "the bootloader" stage, and then knowing the format of kernel+initrd expected to be used by Hekate and other parts of the tooling.

Is that providing enough hints to start? Do ask additional questions, the more precise they are, the more likely I'll be able to help providing an answer quickly :).


Why do I care only about kernel+initrd?

Because anything else after is 99.99% likely to be squarely and entirely managed by the Linux distro with the semantics they want. That's not limited to Nintendo Switch, but basically to all targets. With the caveat that sometimes (e.g. android devices) you have to contend with some limitations (pre-specified partitions) but nothing outright problematic.

My expectation here is that the rootfs of linux distros on switch is just a partition on the SD card. So pretty much the most trivial scenario.

@AndersonTorres
Copy link
Author

My impression is that there is some gap between what is said and how it happens.

The mental model I can think of is more or less like "installing a barebones distro" like Slackware:

  • Pick the storage device
  • Fill it with the files you need
  • Write specific sequences of bytes at specific physical places on the storage device
    • especially the bootloader, that should transfer the control to the OS
  • Plug the configured storage device on a machine and push the power button

In my limited knowledge (looking at tutorials for exotic hardware), sometimes this is a 1-1 correspondence.

@chrisguida
Copy link

Anyone looking into this, please note that you'll need an old, unpatched model of Switch so you can make it boot from the sd card.

https://www.reddit.com/r/SwitchPirates/wiki/before/

@AndersonTorres
Copy link
Author

The modchip does not work?

https://wiki.switchroot.org/wiki/faq

Switchroot does not endorse the manufacture of or provide user support for modchips, but a chipped unit can run Switchroot Android 11, L4T Ubuntu Bionic & Jammy 5.0.0 and up, L4T Fedora, and L4T Lakka (in beta)

@chrisguida
Copy link

chrisguida commented Jun 11, 2024

@AndersonTorres My understanding is that such chips are illegal, and are hard to find for cheap. My whole purpose for wanting nixos on a Switch was to be able to run a server OS on dirt cheap / easy hardware, for educational purposes. Requiring students to buy extra hardware that's expensive, difficult to set up, and possibly illegal is a no-go.

But sure, if your use case does not require things to be cheap or easy, then yeah I guess you can try a mod chip :)

@AndersonTorres
Copy link
Author

AndersonTorres commented Jun 11, 2024

Then your issue is with the hardware.
I do not believe the software stack will be affected by this modchip.

Obviously I am not talking about the legal conundrums with that firm that sells cards.

@chrisguida
Copy link

Yes, I'm just letting people know before they start hacking that they have to buy an unpatched Switch in order to even begin on this.

I stupidly bought a Switch thinking any Switch would be moddable, not noticing that "jailbroken" applies to only some very old Switches, or Switches that have been illegally(?) modified at the hardware level.

Just trying to save others from making the same dumb mistake :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: port New device port 4. type: question Further information is requested
Development

No branches or pull requests

3 participants