Giter Club home page Giter Club logo

nintendoswitchpkg's Introduction

EDK2 Implementation for Nintendo Switch (Tegra210)

Status

Capable to boot something from SD card. If you have a Linux kernel with EFI stub support, supply the device tree for any Tegra210 device (not limited to Nintendo Switch) should boot.

ACPI also boots Windows and Linux, but limited devices are provided (only CPU at this moment).

Device Support

  • CPU services: GIC and Arch Timer.
  • Clocks (reset, PLL, etc.)
  • Power Management (PMC, PMIC & regulators, etc.)
  • GPIO and Pin Multiplexor.
  • MicroSD (should support SDSC, HC. XC probed and have partition table shown, but not intensively tested). eMMC support will be added soon.
  • Screen and FrameBuffer (need special Coreboot)
  • Side-band buttons, not yet registered as EFI Input Device.
  • UART (Right Joy Con, 115200, 8n1)

Windows Kernel Debugger Enablement

bcdedit /store E:\EFI\Microsoft\Boot\BCD /set {default} debug on
bcdedit /store E:\EFI\Microsoft\Boot\BCD /dbgsettings serial debugport:1 baudrate:115200

Plug in connector on the right-side Joy Con and connect to PC. Use WinDbg serial connection and it should work.

Planned / In-Progress

  • EHCI USB host
  • eMMC
  • Sideband buttons as input device
  • Joy-Con (maybe not. Need high speed serial)

Building

See Lumia950XLPkg. Almost identical!

nintendoswitchpkg's People

Contributors

imbushuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nintendoswitchpkg's Issues

tutorial?

nintendo switch windows 10 install tutorial please

Building Special Coreboot

Error here

Skipping submodule '3rdparty/blobs'
    CC         romstage/soc/nvidia/tegra210/sdram.o
src/soc/nvidia/tegra210/sdram.c: In function 'sdram_set_emc_timing':
src/soc/nvidia/tegra210/sdram.c:748:27: error: taking address of packed member of 'struct tegra_emc_regs' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  748 |  writebits(param->EmcCfg, &regs->cfg,
      |                           ^~~~~~~~~~
src/soc/nvidia/tegra210/sdram.c: In function 'sdram_set_clock_enable_signal':
src/soc/nvidia/tegra210/sdram.c:857:6: error: taking address of packed member of 'struct tegra_emc_regs' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  857 |      &regs->nop,
      |      ^~~~~~~~~~
src/soc/nvidia/tegra210/sdram.c: In function 'sdram_set_refresh':
src/soc/nvidia/tegra210/sdram.c:969:6: error: taking address of packed member of 'struct tegra_emc_regs' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  969 |      &regs->ref, (EMC_REF_CMD_MASK | EMC_REF_NORMAL_MASK |
      |      ^~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:338: build/romstage/soc/nvidia/tegra210/sdram.o] Error 1

Any help appreciated (:

GCC not found

I have gcc installed in /opt/ in ubuntu 20.04 WSL error:

WARNING: GCC not found, fallback to /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf- prefix.
WARNING: GCC not found, fallback to /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf- prefix.
.: The term '/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf-gcc' is not recognized as a name of a
cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.

Test-GnuAarch64CrossCollectionVersionRequirements: /home/root1/edk2/NintendoSwitchPkg/Tools/edk2-build.ps1:34
Line |
34 | if ($false -eq (Test-GnuAarch64CrossCollectionVersionRequirements)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GCC AArch64 toolchain is malfunctioned

WARNING: Failed to check GCC version, build may fail!
Use GCC at /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf- to run builds.
Stamp build.
Build NintendoSwitchPkg for NintendoSwitch (DEBUG).
Build environment: Linux-4.4.0-19041-Microsoft-x86_64-with-Ubuntu-20.04-focal
Build start time: 21:24:34, Feb.13 2022

WORKSPACE = /home/root1/edk2
EDK_TOOLS_PATH = /home/root1/edk2/BaseTools
CONF_PATH = /home/root1/edk2/Conf

Architecture(s) = AARCH64

Processing meta-data .Build target = DEBUG
Toolchain = GCC5

Active Platform = /home/root1/edk2/NintendoSwitchPkg/NintendoSwitch.dsc
...

  • Failed -
    Build end time: 21:24:37, Feb.13 2022
    Build total time: 00:00:04

Help! Build fail

when running the command "cp NintendoSwitchPkg/Tools/run-build.sh . && ./run-build.sh"
it gives me this output below
numan@DESKTOP-98K00N:~/edk2$ cp NintendoSwitchPkg/Tools/run-build.sh . && ./run-build.sh
[Builder] Configure environment.
Loading previous configuration from /home/numan/edk2/Conf/BuildEnv.sh
Using EDK2 in-source Basetools
WORKSPACE: /home/numan/edk2
EDK_TOOLS_PATH: /home/numan/edk2/BaseTools
CONF_PATH: /home/numan/edk2/Conf
Task: EDK2 build
Use GCC at /usr/bin/aarch64-linux-gnu- to run builds.
Stamp build.
Build NintendoSwitchPkg for NintendoSwitch (DEBUG).
Build environment: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Build start time: 22:57:07, Jan.29 2024

WORKSPACE = /home/numan/edk2
EDK_TOOLS_PATH = /home/numan/edk2/BaseTools
CONF_PATH = /home/numan/edk2/Conf
PYTHON_COMMAND = python3

Processing meta-data .
Architecture(s) = AARCH64
Build target = DEBUG
Toolchain = GCC5

Active Platform = /home/numan/edk2/NintendoSwitchPkg/NintendoSwitch.dsc

build.py...
/home/numan/edk2/NintendoSwitchPkg/NintendoSwitch.dsc(...): error 4000: Instance of library class [ImagePropertiesRecordLib] is not found
in [/home/numan/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf] [AARCH64]
consumed by module [/home/numan/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf]

  • Failed -
    Build end time: 22:57:08, Jan.29 2024
    Build total time: 00:00:01

Write-Error: Build target NintendoSwitch failed.
False

New SD/MMC driver fails to read blocks from the SD card

EFI Shell is displayed instead of bootaa64.efi from the SD card. GPT partitions show up in the EFI Shell.

Replacing the shell with FreeBSD boot1.efi shows "Failed Reading block" errors:

photo

The card is this:

mmcsd0: 16GB <SDHC SL16G 8.0 SN 92C00EE4 MFG 06/2015 by 3 SD> at mmc0 48.0MHz/4bit/65535-block

Gtdt.asl Typo

Line one "000h 0000 4]"
^

Missing left bracket "[000h 0000 4]"

Can this boot Windows 11?

Hi I'm currently wondering if I should build this.
Has anyone successfully booted Windows 11? If so, were you able to access the shell or desktop?
Thank you.

Is this going to be updated?

Sorry, this isn't an issue, but is this going to be updated?
Also is there a tutorial for trying this on the Switch with Windows on ARM? Does it work? Is it safe?

Can this boot Windows To Go?

Hello!
The current problem is that the installer launches but other drivers are not available. can I use a tool such as Rufus to create a Windows To Go and launch Windows directly without using the installer?

Unable to build

Hi.I'm running Windows. When running the Powershell script, all I see is some red text and then it closes. I can't find any file that was built. How do I build?

Empty screen after recent updates

Hi, thanks for this project!

I've been able to run version d2b9bd6 (and after fixing if (sdmmc_storage_init_sd…)if (!sdmmc_storage_init_sd…) it even boots from SD, though I was getting weird page faults when booting FreeBSD — probably because of #3 MMU stuff that wasn't fixed then?)

Newer versions with the stuff ported from u-boot don't display anything on the screen, it lights up and stays blank :(

When building I receive this error

Use GCC at /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-elf/bin/aarch64-elf- to run builds.
Stamp build.
Build NintendoSwitchPkg for NintendoSwitch (DEBUG).
Build environment: Linux-4.4.0-19041-Microsoft-x86_64-with-Ubuntu-20.04-focal
Build start time: 13:44:53, Feb.12 2022

WORKSPACE = /home/root1/edk2
EDK_TOOLS_PATH = /home/root1/edk2/BaseTools
CONF_PATH = /home/root1/edk2/Conf

Architecture(s) = AARCH64

Processing meta-data .Build target = DEBUG
Toolchain = GCC5

Active Platform = /home/root1/edk2/NintendoSwitchPkg/NintendoSwitch.dsc
.

build.py...
/home/root1/edk2/NintendoSwitchPkg/NintendoSwitch.dsc(...): error 4000: Instance of library class [RegisterFilterLib] is not found
in [/home/root1/edk2/ArmPlatformPkg/PrePi/PeiUniCore.inf] [AARCH64]
consumed by module [/home/root1/edk2/ArmPlatformPkg/PrePi/PeiUniCore.inf]

  • Failed -
    Build end time: 13:44:55, Feb.12 2022
    Build total time: 00:00:02

Write-Error: Build target NintendoSwitch failed.
False

EDK2

Do u still have edk2 sources for msm8916?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.