Skip to content

Commit

Permalink
Update workflow and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts committed Dec 5, 2024
1 parent 97e533d commit cf23ea6
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 20 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,41 @@ jobs:
build-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout udpih
uses: actions/checkout@v4
with:
path: udpih
submodules: recursive
- name: Build pico

- name: Checkout pico-sdk
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
ref: master
path: pico-sdk
submodules: recursive

- name: Setup pico-sdk
run: |
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Build arm_kernel code
run: |
cd ${{github.workspace}}/udpih
docker build -t udpihbuilder .
docker run --rm -v ${PWD}:/project udpihbuilder make pico
docker run --rm -v ${PWD}:/project udpihbuilder make arm_kernel
- name: Build pico code
run: |
export PICO_SDK_PATH=${{github.workspace}}/pico-sdk
cd ${{github.workspace}}/pico
make
- uses: actions/upload-artifact@v4
with:
name: udpih
path: |
arm_kernel/arm_kernel.bin.h
pico/build_rp2040/udpih.uf2
pico/build_rp2350/udpih.uf2
${{github.workspace}}/arm_kernel/arm_kernel.bin.h
${{github.workspace}}/pico/build_rp2040/udpih.uf2
${{github.workspace}}/pico/build_rp2350/udpih.uf2
if-no-files-found: error
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
FROM devkitpro/devkitarm:20240511
FROM devkitpro/devkitarm:20241111

ENV PATH=$DEVKITARM/bin:$PATH

RUN apt-get update && apt-get -y install --no-install-recommends build-essential cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib && rm -rf /var/lib/apt/lists/*

# clone pico-sdk
RUN git clone https://github.com/raspberrypi/pico-sdk
ENV PICO_SDK_PATH=/pico-sdk

WORKDIR /project
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ Exploits the Wii U's USB Host Stack descriptor parsing. Pronounced like "mud pie
I will add more devices below which are confirmed to work.*

### Supported devices:
- Raspberry Pi Pico
- Raspberry Pi Pico / Pico 2
- Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5
- Steam Deck
- Nintendo Switch capable of running [udpih_nxpayload](https://github.com/GaryOderNichts/udpih_nxpayload)

## Instructions
### Device Setup
Follow the setup guide for the device you want to use below:
- [Raspberry Pi Pico](./docs/setup-pico.md)
- [Raspberry Pi Pico / Pico 2](./docs/setup-pico.md)
- [Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5](./docs/setup-linux.md)
- [Steam Deck](./docs/setup-linux.md)
- [Nintendo Switch](https://github.com/GaryOderNichts/udpih_nxpayload#Instructions)

### Booting the recovery_menu
> :warning: Important notes for this to work:
> [!IMPORTANT]
> Important notes for this to work:
> - Make sure **no** other USB devices are attached to the console.
> - Only use USB ports on the **front** of the console, the back ports **will not** work.
> - If your console has standby mode enabled, pull the power plug and turn it on from a full coldboot state.
Expand Down
9 changes: 6 additions & 3 deletions docs/setup-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ Some devices require additional setup for UDPIH to work. Click on the device you
<details>
<summary><strong>Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5 (Expand)</strong></summary>

> :information_source: For the Pi Zero and Zero 2 W you will need 2 USB cables, one for powering the Zero and one which can be connected to the Wii U.
> [!NOTE]
> For the Pi Zero and Zero 2 W you will need 2 USB cables, one for powering the Zero and one which can be connected to the Wii U.
> :information_source: For the Pi 4 and 5 you need to provide power through the power headers because the USB-C port is the only port the supports USB OTG and must get connected to the Wii U. Unfortunately, when trying to power the Pi over USB-C using the Wii U's USB ports, the Pi doesn't boot fast enough. The USB-A ports do not support USB OTG and cannot be used for this exploit: you **must** connect the USB-C port to the Wii U during the exploit.
> [!NOTE]
> For the Pi 4 and 5 you need to provide power through the power headers because the USB-C port is the only port the supports USB OTG and must get connected to the Wii U. Unfortunately, when trying to power the Pi over USB-C using the Wii U's USB ports, the Pi doesn't boot fast enough. The USB-A ports do not support USB OTG and cannot be used for this exploit: you **must** connect the USB-C port to the Wii U during the exploit.
> :information_source: This guide expects that you use Raspberry Pi OS.
> [!NOTE]
> This guide expects that you use Raspberry Pi OS.
To use USB gadgets(OTG) you need to enable `dwc2` by running the command below:
> :warning: Prior to Raspberry Pi OS Bookworm, Raspberry Pi OS stored the boot partition at `/boot/`.
Expand Down
2 changes: 1 addition & 1 deletion docs/setup-pico.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pico
## Instructions
- Download the latest `udpih.uf2` from the [releases page](https://github.com/GaryOderNichts/udpih/releases).
- Download the latest `udpih_pico.uf2` for the Pico, or `udpih_pico2.uf2` for the Pico 2, from the [releases page](https://github.com/GaryOderNichts/udpih/releases).
- Hold down the `BOOTSEL` button on the board and connect the Pico to your PC.
Your PC will detect the Pi as a storage device.
- Copy the `.uf2` file to the Pico. It will disconnect after a few seconds.
Expand Down

0 comments on commit cf23ea6

Please sign in to comment.