From cf23ea6b38509c44199d394e56708087e5944590 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:42:04 +0100 Subject: [PATCH] Update workflow and documentation --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++------ Dockerfile | 8 +------- README.md | 7 ++++--- docs/setup-linux.md | 9 ++++++--- docs/setup-pico.md | 2 +- 5 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5099091..b7a9d98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 228daa3..762387d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index efc1e04..3f005d4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ 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) @@ -20,13 +20,14 @@ Exploits the Wii U's USB Host Stack descriptor parsing. Pronounced like "mud pie ## 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. diff --git a/docs/setup-linux.md b/docs/setup-linux.md index 2675998..bbaf2e3 100644 --- a/docs/setup-linux.md +++ b/docs/setup-linux.md @@ -5,11 +5,14 @@ Some devices require additional setup for UDPIH to work. Click on the device you
Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5 (Expand) - > :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/`. diff --git a/docs/setup-pico.md b/docs/setup-pico.md index 462f53c..56281e6 100644 --- a/docs/setup-pico.md +++ b/docs/setup-pico.md @@ -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.