Files
hekate/nyx/BOOTLOADER_SYS_ORIGINS.md
niklascfw 6b956c6fe2 Nyx: emuMMC tab realign on reload, sd_out script, bootloader/sys doc
- gui_emummc_tools: re-apply container position after reload so content
  does not jump to top when returning from sub-windows (Change emuMMC, etc.)
- Add sd_out.py: pack build output to output/hekate_X.Y.Z_Nyx_A.B.C.zip
  (payload.bin, bootloader/update.bin, bootloader/sys/*, no ini/patches)
- Add nyx/BOOTLOADER_SYS_ORIGINS.md: where res.pak, thk.bin, emummc.kipm, l4t/ come from

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 22:54:16 +01:00

64 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# bootloader/sys/ Missing files and where they come from
The repo only builds and packages **nyx.bin**, **libsys_lp0.bso**, and **libsys_minerva.bso**. The rest of `bootloader/sys/` is not built here. Below is where each missing piece comes from.
---
## res.pak
- **What:** Nyx GUI resource pack (fonts, glyphs, assets). Loaded at `NYX_RES_ADDR`; without it Nyx will show “res.pak not found or corrupted”.
- **Where:** Built with **nyx-res-tool** (extract/build res.pak from a directory of resources).
- **Repo:** https://github.com/friedkeenan/nyx-res-tool
- **Usage:** `extract.py` to unpack an existing res.pak; `build.py` to pack a directory into res.pak.
- **Alternative:** Use a res.pak from an official hekate release (e.g. CTCaer) and place it in `bootloader/sys/`.
---
## thk.bin
- **What:** Atmosphère **Tsec Hovi Keygen** firmware. Used for TSEC/crypto when booting HOS (e.g. package1 decryption). If missing, boot can fail with TSEC/keygen errors.
- **Where:** From **Atmosphère** (Atmosphere-NX/Atmosphere). It is built as part of their sept/tsec keygen and shipped in their release package; the binary that hekate expects as `bootloader/sys/thk.bin` is that keygen blob.
- **Repo:** https://github.com/Atmosphere-NX/Atmosphere
- **In practice:** Copy `thk.bin` from an official Atmosphère release (e.g. `atmosphere/` or their “hekate” bundle) into `bootloader/sys/`.
---
## emummc.kipm
- **What:** emuMMC **KIP1 module** (patch data). Injected into the **FS** KIP1 at boot when emuMMC is used (`_kipm_inject("bootloader/sys/emummc.kipm", "FS", ki)` in `pkg2.c`). Contains caps + .text that get merged into the FS kip.
- **Where:** Built from the **m4xw/emuMMC** project (not this repo).
- **Repo:** https://github.com/m4xw/emuMMC
- **Build (hekate):** Run `./build.sh` in the emuMMC repo; it produces a `.kipm` file. Copy that file to `bootloader/sys/` as `emummc.kipm`.
- **Requirements:** devkitARM / devkitA64 and the toolchain expected by the emuMMC Makefile (see their README).
- **Alternative:** Copy **emummc.kipm** from an official hekate release (e.g. CTCaer/hekate) into `bootloader/sys/`. Use a kipm that matches your hekate/HOS version.
---
## bootloader/sys/l4t/
- **What:** Firmware blobs for **L4T** (Linux/Android on Switch): BL31, BL33, SC7 entry/exit, BPMP, etc. Used when booting L4T or when warmboot needs `sc7exit_b01.bin`.
- **Files expected (from `l4t.c` and `pkg1.c`):**
- `bl31.bin`
- `bl33.bin`
- `sc7entry.bin`
- `sc7exit.bin`
- `bpmpfw.bin`
- `bpmpfw_b01.bin`
- `mtc_tbl_b01.bin`
- `sc7exit_b01.bin` (referenced in `pkg1.c` for warmboot)
- **Where:** From **L4T / Switchroot** (or similar) L4T/SD release packages that provide “bootloader/sys/l4t/” (or equivalent) with these binaries. Not built in hekate-pro.
- **In practice:** Copy the **l4t/** folder (with the files above) from an official hekate L4T-capable release or from a Switchroot/L4T image that matches the expected layout.
---
## Summary
| File or folder | Origin |
|----------------------|--------|
| **res.pak** | Build with [nyx-res-tool](https://github.com/friedkeenan/nyx-res-tool), or copy from official hekate release. |
| **thk.bin** | Atmosphère (sept/tsec keygen); copy from official Atmosphère release. |
| **emummc.kipm** | Build from [m4xw/emuMMC](https://github.com/m4xw/emuMMC) (`./build.sh`), or copy from official hekate release. |
| **bootloader/sys/l4t/** | L4T/Switchroot firmware; copy from hekate L4T bundle or L4T image. |
After copying these into `bootloader/sys/` (and `bootloader/sys/l4t/`), your SD layout matches what the reference `hekate_pro_6.5.1_Nyx_1.9.1`-style folder expects.