finalizing: switch to file-management scriptrunner (#2427)

choo choo, all aboard the train to OCS

* finalizing: switch to file-management scriptrunner

    Switch to scriptrunner for file management (to lessen user error from incorrectly copying files).
        Thus, users will need to copy just two files: finalize_helper.firm to SD:/luma/payloads/ (which will have to be created by the user) and finalize.romfs (which ends up on root of SD).
        This change allows for better checking of file integrity and lessens the chance of user error from incorrectly copying files.
        The scriptrunner's task is to load finalize.romfs from the SD card, unpack it, and to copy its contents to root of SD.
        The intended location of finalize.romfs is root of SD, but the scriptrunner will attempt to move the file if it is found in SD:/Nintendo 3DS, SD:/DCIM, SD:/luma, or SD:/luma/payloads.
    Remove errors relating to missing files (since that should no longer be possible).
    Add visuals on the top screen for error resolution, with QR codes to the guide / NH where appropriate.

* finalizing: inline chainloader

in case people have more than one payload
This commit is contained in:
lily 2024-02-06 01:21:02 +01:00 committed by GitHub
parent 97a74aeb38
commit 7c3af39e12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 50 deletions

View file

@ -35,7 +35,8 @@ If your previous CFW setup was EmuNAND-based and you wish to move the contents o
### What You Need ### What You Need
* [finalizing.zip]({{ base_path }}/assets/finalizing.zip) (direct download) * [finalize_helper.firm]({{ base_path }}/assets/finalize_helper.firm) (direct download)
* [finalize.romfs]({{ base_path }}/assets/finalize.romfs) (direct download)
### Instructions ### Instructions
@ -45,8 +46,9 @@ In this section, you will copy the files necessary to follow the rest of the ins
1. Power off your console 1. Power off your console
1. Insert your SD card into your computer 1. Insert your SD card into your computer
1. Copy the contents of `finalizing.zip` (`finalize`, `gm9`, and `luma`) to the root of your SD card, merging/replacing any existing folders if prompted 1. Copy `finalize.romfs` to the root of your SD card
+ If you are using a Mac, hold the Option key while dragging the folders to the root of your SD card, then click "Merge" 1. Open the `luma` folder and create a folder named `payloads` inside, if it does not already exist
1. Copy `finalize_helper.firm` to the `payloads` folder
1. Reinsert your SD card into your console 1. Reinsert your SD card into your console
The screenshot below indicates the minimum SD card layout that is required to follow this page. You may have extra files or folders on your SD card, depending on your previous setup or the method that you followed. The screenshot below indicates the minimum SD card layout that is required to follow this page. You may have extra files or folders on your SD card, depending on your previous setup or the method that you followed.
@ -54,27 +56,16 @@ The screenshot below indicates the minimum SD card layout that is required to fo
![]({{ "/images/screenshots/finalizing-root-layout.png" | absolute_url }}) ![]({{ "/images/screenshots/finalizing-root-layout.png" | absolute_url }})
{: .notice--info} {: .notice--info}
#### Section II - CFW Check ![]({{ "/images/screenshots/finalizing-luma-payloads.png" | absolute_url }})
{: .notice--info}
As an additional safety measure, we will perform an additional check for custom firmware. If custom firmware is not installed by this point for any reason, the next section may render your console unable to be hacked without external hardware. #### Section II - Updating the System
1. Power off your console
1. Hold the (Select) button
1. Power on your console while still holding the (Select) button
1. If the check was successful, your console should have booted into the Luma3DS configuration menu
1. Press (Start) to save and reboot
If you do NOT boot into the Luma3DS configuration menu, custom firmware was not installed on your console. Join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) and ask, in English, for help.
{: .notice--danger}
#### Section III - Updating the System
In this section, you will update your system to the latest version, which is safe to do with custom firmware. In this section, you will update your system to the latest version, which is safe to do with custom firmware.
{% include_relative include/sysupdate.txt cfw="true" %} {% include_relative include/sysupdate.txt cfw="true" %}
#### Section IV - RTC and DSP setup #### Section III - RTC and DSP setup
In this section, you will sync your 3DS internal clock with the actual time and dump the sound firmware (which is necesssary for some homebrew software to use sound properly). In this section, you will sync your 3DS internal clock with the actual time and dump the sound firmware (which is necesssary for some homebrew software to use sound properly).
@ -88,13 +79,18 @@ In this section, you will sync your 3DS internal clock with the actual time and
1. Press (B) to return to the Rosalina main menu 1. Press (B) to return to the Rosalina main menu
1. Press (B) to exit the Rosalina menu 1. Press (B) to exit the Rosalina menu
#### Section V - Setup Script #### Section IV - Setup Script
In this section, you will use a script to automate homebrew installation, SD card cleanup, and system file backup. In this section, you will use a series of scripts to automate homebrew installation, SD card cleanup, and system file backup.
1. Power off your console 1. Power off your console
1. Press and hold (Start), and while holding (Start), power on your console. This will launch GodMode9 1. Press and hold (Start), and while holding (Start), power on your console. This will launch the Finalizing Setup Helper
+ If you do not boot into GodMode9, ensure that you copied the three folders from `finalizing.zip` to the root of your SD card and that the folders are not misnamed (e.g. `luma (1)`) + If you boot to the Luma3DS configuration menu, you held SELECT instead of START
+ If you boot to the HOME Menu, your `payloads` folder may be incorrectly spelled or in the wrong location
+ If you see a "Luma3DS Chainloader" menu, use the D-Pad and (A) buttons to navigate to and select `finalize_helper` from the list
+ If you encounter an error, consult the [troubleshooting](troubleshooting#finalizing-setup) page
1. If the Helper was successful, your console will boot into GodMode9
+ From this point forward, you can access GodMode9 by holding START while powering on your console
1. If you are prompted to create an essential files backup, press (A) to do so, then press (A) to continue once it has completed 1. If you are prompted to create an essential files backup, press (A) to do so, then press (A) to continue once it has completed
1. If you are prompted to fix the RTC date&time, press (A) to do so, then set the date and time, then press (A) to continue 1. If you are prompted to fix the RTC date&time, press (A) to do so, then set the date and time, then press (A) to continue
1. Press (Home) to bring up the action menu 1. Press (Home) to bring up the action menu
@ -103,7 +99,7 @@ In this section, you will use a script to automate homebrew installation, SD car
1. Follow the prompts in the script, answering any questions that you are asked 1. Follow the prompts in the script, answering any questions that you are asked
+ If you encounter an error, follow the instructions in the error message or consult the [troubleshooting](troubleshooting#finalizing-setup) page + If you encounter an error, follow the instructions in the error message or consult the [troubleshooting](troubleshooting#finalizing-setup) page
1. Once the script says "Setup complete!", press (A) to power off the device 1. Once the script says "Setup complete!", press (A) to power off the device
+ If you do NOT see the message "Setup complete!", the script was not successful and you will need to redo this section + If you do NOT see the message "Setup complete!", the script was not successful and you will need to redo this section from Step 3
1. Insert your SD card into your computer 1. Insert your SD card into your computer
1. Copy the `/gm9/backups/` folder to a safe location on your computer 1. Copy the `/gm9/backups/` folder to a safe location on your computer
+ This folder contains critical file backups and should be backed up to multiple locations (i.e. cloud storage) if possible + This folder contains critical file backups and should be backed up to multiple locations (i.e. cloud storage) if possible
@ -117,11 +113,11 @@ ___
You're done! Custom firmware is now fully configured on your console. You're done! Custom firmware is now fully configured on your console.
{: .notice--success} {: .notice--success}
### Information and Notes
Trying to figure out what to do with your newly modded device? Visit [our wiki](https://wiki.hacks.guide/wiki/3DS:Things_to_do)! Trying to figure out what to do with your newly modded device? Visit [our wiki](https://wiki.hacks.guide/wiki/3DS:Things_to_do)!
{: .notice--info} {: .notice--info}
### Information and Notes
{% capture notice-6 %} {% capture notice-6 %}
Here are some key combos that you should know: Here are some key combos that you should know:

View file

@ -448,21 +448,34 @@ The steps below can be attempted in any order, but are listed from easiest to ha
<details>{{ compat | markdownify }}</details> <details>{{ compat | markdownify }}</details>
{% capture compat %} {% capture compat %}
<summary><u>Error #02: Missing essential.exefs</u></summary> <summary><u>Error #22: finalize.romfs is invalid</u></summary>
You said 'No' to the "Make essential files backup?" prompt in GodMode9. Power off your console, power it on while holding (Start) to re-enter GodMode9, say 'Yes' to the prompt, then try again. The file `finalize.romfs` is corrupt or unreadable. [Re-download it](/assets/finalize.romfs) and copy it to the root of the SD card, replacing any existing copy, then try again.
{% endcapture %} {% endcapture %}
<details>{{ compat | markdownify }}</details> <details>{{ compat | markdownify }}</details>
{% capture compat %} {% capture compat %}
<summary><u>Information #23: finalize.romfs in wrong location</u></summary>
<summary><u>Unable to open GodMode9 or Error #03: Missing files</u></summary> The file `finalize.romfs` was placed in the wrong location (the `Nintendo 3DS` folder instead of root of SD). The script will attempt to resolve this, but requires your permission to do so. Press (A) on the next few prompts to continue.
You did not copy everything from `finalize.zip` to the root of your SD card. Remember, your SD card should have at least these files: {% endcapture %}
<details>{{ compat | markdownify }}</details>
![]({{ "/images/screenshots/finalizing-root-layout.png" | absolute_url }}) {% capture compat %}
{: .notice--info} <summary><u>Error #24: SD is write-protected</u></summary>
Ensure that your SD card is not [locked](/images/sdlock.png). If the SD card is not locked and you continue to get this error, join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) for assistance.
{% endcapture %}
<details>{{ compat | markdownify }}</details>
{% capture compat %}
<summary><u>Error #02: Missing essential.exefs</u></summary>
You said 'No' to the "Make essential files backup?" prompt in GodMode9. Power off your console, power it on while holding (Start) to re-enter GodMode9, say 'Yes' to the prompt, then try again.
{% endcapture %} {% endcapture %}
<details>{{ compat | markdownify }}</details> <details>{{ compat | markdownify }}</details>
@ -533,25 +546,6 @@ If you have enough space on your SD card, your SD might be corrupted or faulty.
{% endcapture %} {% endcapture %}
<details>{{ compat | markdownify }}</details> <details>{{ compat | markdownify }}</details>
{% capture compat %}
<summary><u>Error #09: Unsupported GodMode9 version</u></summary>
You are somehow running a version of GodMode9 not packaged with the script. Make sure you copied the contents of `finalize.zip` to the root of your SD card and that you are holding START while powering on your console.
{% endcapture %}
<details>{{ compat | markdownify }}</details>
{% capture compat %}
<summary><u>Error #11: Missing donor database</u></summary>
You did not copy everything from `finalize.zip` to the root of your SD card. Remember, your SD card should have at least these files:
![]({{ "/images/screenshots/finalizing-root-layout.png" | absolute_url }})
{: .notice--info}
{% endcapture %}
<details>{{ compat | markdownify }}</details>
{% capture compat %} {% capture compat %}
<summary><u>Error #12: Copy (file).db fail</u></summary> <summary><u>Error #12: Copy (file).db fail</u></summary>

BIN
assets/finalize.romfs Normal file

Binary file not shown.

BIN
assets/finalize_helper.firm Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 29 KiB