Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[WIP] Gentoo on Nintendo Switch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Fri Jun 14, 2019 8:17 am    Post subject: [WIP] Gentoo on Nintendo Switch Reply with quote

I started work on Gentoo Intallation for my Nintendo Switch, since it is possible to run Linux from SD-Card without touching the original Firmware.
Since I found https://gbatemp.net/threads/32-bit-gentoo-buiild-with-kodi-18-and-netflix-support.540307/ Gavin and me working together for 64 bit Gentoo.
The current status is still experimental. But the most things are working.
Communication channel is Discord: https://discord.com/channels/692020816241623081/697241496260313118

To start own installation the next links are useful:
Bootstrap and Cross-Compiling Howto: https://gitlab.com/bell07/gentoo-switch_overlay/-/blob/master/bootstrap.md
Switch Overlay: https://gitlab.com/bell07/gentoo-switch_overlay
Switch-optimized system stage: https://github.com/bell07/bashscripts-switch_gentoo/releases
Live Linux for "Classic" installation with building the system directly on switch https://github.com/bell07/bashscripts-switch_gentoo/releases (yes, the same link)

My private binhost is: http://bell.7u.org/pub/gentoo-switch/packages/ - But gentoo-like is not to use it ;-)
Note: It is my home-server, so no 24/7 availability given.
My private Cross-Compiling scripts are: https://github.com/bell07/bashscripts-switch_gentoo

The make.conf is provided by Overlay in make.defaults
Therefore it is enough to set one of the switch:nintendo_switch/17.0/* profile for right optimizations.


Last edited by bell on Fri Sep 15, 2023 10:41 am; edited 7 times in total
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Fri Jun 14, 2019 7:20 pm    Post subject: Reply with quote

Awesome! (Only posted to get notified.)
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Tue Jun 18, 2019 7:21 am    Post subject: Reply with quote

Missed the manpages in chroot today. Should I keep or remove the
Code:
FEATURES="noman noinfo nodoc" # Usual embedded setup
for binhost packages?

EDIT 2019-06-20:
Updated binhost packages and the stage. (Renamed to stage3 now).
The stage contains buildtime-dependencies because some of them are essential (most notable is perl).
Binhost contains the distcc package for shared compiling between qemu-chroot (slow) and crossdev toolchain (faster).
The scripts updated also to reflect the changes.

EDIT 2019-06-21:
Removed the FEATURES="noman noinfo nodoc". The additional documentation requires small storage overhead but does not affect the runtime performance.
I considered to replace the -Os to -O2, but smaller binaries are faster on devices with slow storage (SD-cards are slow).
Recompiled all packages and also the stage file.
Added an switch overlay (currently empty) for the next target: switch-sources, with capability to provide binary kernel.
Back to top
View user's profile Send private message
gavin_darkglider1
n00b
n00b


Joined: 04 Nov 2017
Posts: 10

PostPosted: Wed Jun 26, 2019 1:48 pm    Post subject: Reply with quote

I left you a bunch of notes a copy of my make.conf, and an ebuild for the drivers in a PM on gbatemp. Let me know if you get that repo up, as to build there are some profile changes and use mask changes that need to be applied, and that would be much cleaner with a non local repo to push changes to others.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Thu Jun 27, 2019 6:30 pm    Post subject: Reply with quote

Next snippet done. Thanks to @gavin_darkglider1 for provided informations and examples!

New Ebuilds in Overlay:
sys-kernel/l4t-kernel
The ebuild downloads and compiles all reqired stuff to get working kernel image and /lib/modules
Note: not just unpack the sources, but use the default config, compile and install all
There is also the pre-compiled package in my binhost for the ebuild.

sys-firmware/jetson-tx1-firmware
Required to build the kernel above. Ebuild and Binhost package provided by gavin_darkglider1. The source package is not unpackeable by gentoo's bzip2 version, so the ebuild is not useable out of the box.

The boot chain is still incomplete. If done, I plan to try some gentoo specific optimizations and updates on kernel...

EDIT: 2019-07-08: First "release"-Package available. This "release" is just minimal booteable gentoo. Without any console, still heavy experimental. You cannto see anything on display or TV. How to test is described in https://github.com/bell07/bashscripts-switch_gentoo#first-boot. In short: you can edit wpa_supplicant.conf, then the gentoo on switch connects to wifi and you can access them trough ssh.

As said, the release is really useless, if you expect more, wait for @gavin_darkglider1 does release anything. He is along me. We work together, but with some different goals. I have to run in some issues he already solved at the first, to understand them. The boot chain is still incomplete. The generated tegra210-icosa.dtb does not boot, therefore in "release" package a working tegra210-nintendo-switch.dtb is used, "precompiled" from other distro.

EDIT: 2019-08-06: Recompiled all with gcc-7 for fully binary compatibility to nvidia blobs.
Next step: Move to gavin_darkglider1 overlay and handle in my the binhost related profile only. And of course further Kernel ebuild and config optimizations..
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sat Jan 07, 2023 8:43 am    Post subject: Reply with quote

hi .
grate to see a work with gentoo on nintendo switch . would you mind give me some more info how to get started :



    1. if there is an ebuild for tegrarcm-gui?
    2. the status of booting in to gentoo?
    3.if possibe links to needed stuff in first topic would be nice


i have been working with fusee gelee with tegra3 quite a lot but dont think it is the same as on the switch.

regards hedmo
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Tue Aug 08, 2023 6:48 am    Post subject: Reply with quote

Sorry for late answer, I do not get notifications currently.

1. There is no ebuild for Tegrarcm
I just use https://github.com/Qyriad/fusee-launcher (last master)
+ Launcher Script:
Code:
#!/bin/sh
logger "Run fusee-primary.bin"
/scripts/switch_launcher/fusee-launcher/fusee-launcher.py /scripts/switch_launcher/payloads/hekate_ctcaer.bin

+ Udev Rule in /etc/udev/rules.d/20_nsw_payload_launcher.rules
Code:
ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7321",  RUN+="/scripts/switch_launcher/start_switch_payload.sh"

Then hekate launches automatically if I connect my switch to my computer and enter RCM.

2. I am able to boot into XFCE and play Supertux using connected joycons. ;-) There are still some issues, but such a project thrives on participation.
Current caveat is https://bugs.gentoo.org/911375, the workaround is just keep the version of sys-process/procps from stage3.

3. I update the links in first post now
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Fri Sep 15, 2023 10:42 am    Post subject: Reply with quote

Updated links in first message, since I updated the documentation, stage3 and created an Live Linux for "Classic" installation.
The Caveeat mentioned above is solved by glibc and gcc downgrade :-(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum