Compare commits

...

10 Commits

Author SHA1 Message Date
4c2b7d4b29 feat(nyx): support per-tab backgrounds with shared fallback 2025-11-11 20:41:39 +01:00
CTCaer
5e8b01f727 Bump hekate to v6.3.1 2025-05-28 04:54:14 +03:00
CTCaer
95fede4418 hos: bail if requested emummc patch is not applied 2025-05-28 04:53:58 +03:00
CTCaer
f27934388e hos: 20.1.0 FS support 2025-05-28 04:51:34 +03:00
CTCaer
47f8f3d6da Bump hekate to v6.3.0 and Nyx to v1.7.0 2025-04-30 09:28:34 +03:00
CTCaer
ff2b275794 Update readme
Add sys/l4t folder description, simplify some wording and also add `sld_type` key.
2025-04-30 09:28:24 +03:00
CTCaer
85fa62cafc l4t: use strtol for sld_type 2025-04-30 09:27:34 +03:00
CTCaer
75bac23d01 Change several makefile prints
Silence some, fix newline to others.
2025-04-30 09:24:42 +03:00
CTCaer
466beedb28 hos: add 20.0.0 support 2025-04-30 09:22:04 +03:00
CTCaer
57e31c09f9 nyx: info: move sd FAT info after showing errors 2025-04-30 09:15:52 +03:00
24 changed files with 287 additions and 108 deletions

View File

@@ -101,15 +101,14 @@ TOOLS := $(TOOLSLZ) $(TOOLSB2C)
all: $(TARGET).bin $(LDRDIR)
@printf ICTC49 >> $(OUTPUTDIR)/$(TARGET).bin
@echo "--------------------------------------"
@echo -n "Uncompr size: "
@echo "$(TARGET) size:"
@echo -n "Uncompr: "
$(eval BIN_SIZE = $(shell wc -c < $(OUTPUTDIR)/$(TARGET)_unc.bin))
@echo $(BIN_SIZE)" Bytes"
@echo "Uncompr Max: 140288 Bytes + 3 KiB BSS"
@if [ ${BIN_SIZE} -gt 140288 ]; then echo "\e[1;33mUncompr size exceeds limit!\e[0m"; fi
@echo -n "Payload size: "
@echo -n "Payload: "
$(eval BIN_SIZE = $(shell wc -c < $(OUTPUTDIR)/$(TARGET).bin))
@echo $(BIN_SIZE)" Bytes"
@echo "Payload Max: 126296 Bytes"
@if [ ${BIN_SIZE} -gt 126296 ]; then echo "\e[1;33mPayload size exceeds limit!\e[0m"; fi
@echo "--------------------------------------"
@@ -126,7 +125,7 @@ $(NYXDIR):
$(LDRDIR): $(TARGET).bin
@$(TOOLSLZ)/lz77 $(OUTPUTDIR)/$(TARGET).bin
mv $(OUTPUTDIR)/$(TARGET).bin $(OUTPUTDIR)/$(TARGET)_unc.bin
@mv $(OUTPUTDIR)/$(TARGET).bin $(OUTPUTDIR)/$(TARGET)_unc.bin
@mv $(OUTPUTDIR)/$(TARGET).bin.00.lz payload_00
@mv $(OUTPUTDIR)/$(TARGET).bin.01.lz payload_01
@$(TOOLSB2C)/bin2c payload_00 > $(LDRDIR)/payload_00.h
@@ -139,11 +138,11 @@ $(TOOLS):
@$(MAKE) --no-print-directory -C $@ $(MAKECMDGOALS) -$(MAKEFLAGS)
$(TARGET).bin: $(BUILDDIR)/$(TARGET)/$(TARGET).elf $(MODULEDIRS) $(NYXDIR) $(TOOLS)
$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$@
@$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$@
$(BUILDDIR)/$(TARGET)/$(TARGET).elf: $(OBJS)
@$(CC) $(LDFLAGS) -T $(SOURCEDIR)/link.ld $^ -o $@
@echo "hekate was built with the following flags:\nCFLAGS: "$(CFLAGS)"\nLDFLAGS: "$(LDFLAGS)
@printf "$(TARGET) was built with the following flags:\nCFLAGS: $(CFLAGS)\nLDFLAGS: $(LDFLAGS)\n"
$(BUILDDIR)/$(TARGET)/%.o: %.c
@echo Building $@

View File

@@ -50,13 +50,14 @@ Custom Graphical Nintendo Switch bootloader, firmware patcher, tools, and many m
| \|__ background.bmp | Nyx - Custom background. User provided. |
| \|__ icon_switch.bmp | Nyx - Default icon for CFWs. |
| \|__ icon_payload.bmp | Nyx - Default icon for Payloads. |
| bootloader/sys/ | hekate and Nyx system modules folder. |
| \|__ emummc.kipm | emuMMC KIP1 module. !Important! |
| \|__ libsys_lp0.bso | LP0 (sleep mode) module. Important! |
| \|__ libsys_minerva.bso | Minerva Training Cell. Used for DRAM Frequency training. !Important! |
| \|__ nyx.bin | Nyx - hekate's GUI. !Important! |
| \|__ res.pak | Nyx resources package. !Important! |
| \|__ thk.bin | Atmosphère Tsec Hovi Keygen. !Important! |
| bootloader/sys/ | hekate and Nyx system modules folder. !Important! |
| \|__ emummc.kipm | emuMMC KIP1 module. |
| \|__ libsys_lp0.bso | LP0 (sleep mode) module. |
| \|__ libsys_minerva.bso | Minerva Training Cell. Used for DRAM Frequency training. |
| \|__ nyx.bin | Nyx - hekate's GUI. |
| \|__ res.pak | Nyx resources package. |
| \|__ thk.bin | Atmosphère Tsec Hovi Keygen. |
| \|__ /l4t/ | Folder with firmware relevant to L4T (Linux/Android). |
| bootloader/screenshots/ | Folder where Nyx screenshots are saved |
| bootloader/payloads/ | For the `Payloads` menu. All CFW bootloaders, tools, Linux payloads are supported. Autoboot only supported by including them into an ini. |
| bootloader/libtools/ | Reserved |
@@ -76,9 +77,9 @@ There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Capti
### hekate Global Configuration keys/values (when entry is *[config]*):
| Config option | Description |
| ------------------ | ---------------------------------------------------------- |
| autoboot=0 | 0: Disable, #: Boot entry number to auto boot. |
| Config option | Description |
| ------------------ | -------------------------------------------------------------- |
| autoboot=0 | 0: Disable, #: Boot entry number to auto boot. |
| autoboot_list=0 | 0: Read `autoboot` boot entry from hekate_ipl.ini, 1: Read from ini folder (ini files are ASCII ordered). |
| bootwait=3 | 0: Disable (It also disables bootlogo. Having **VOL-** pressed since injection goes to menu.), #: Time to wait for **VOL-** to enter menu. Max: 20s. |
| noticker=0 | 0: Animated line is drawn during custom bootlogo, signifying time left to skip to menu. 1: Disable. |
@@ -86,7 +87,7 @@ There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Capti
| autonogc=1 | 0: Disable, 1: Automatically applies nogc patch if unburnt fuses found and a >= 4.0.0 HOS is booted. |
| bootprotect=0 | 0: Disable, 1: Protect bootloader folder from being corrupted by disallowing reading or editing in HOS. |
| updater2p=0 | 0: Disable, 1: Force updates (if needed) the reboot2payload binary to be hekate. |
| backlight=100 | Screen backlight level. 0-255. |
| backlight=100 | Screen backlight level. 0-255. |
### Boot entry key/value combinations:
@@ -99,12 +100,12 @@ There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Capti
| kip1={FILE path} | Replaces/Adds kernel initial process. Multiple can be set. |
| kip1={FOLDER path}/* | Loads every .kip/.kip1 inside a folder. Compatible with single kip1 keys. |
| pkg3={FILE path} | Takes an Atmosphere `package3` binary and `extracts` all needed parts from it. kips, exosphere, warmboot and mesophere. |
| fss0={FILE path} | Same as above. Deprecated! |
| fss0={FILE path} | Same as above. !Deprecated! |
| pkg3ex=1 | Enables loading of experimental content from a PKG3/FSS0 storage |
| pkg3kip1skip={KIP name} | Skips loading a kip from `pkg3`/`fss0`. Specify with multiple lines and/or in one line with `,` as separator. |
| pkg3kip1skip={KIP name} | Skips loading a kip from `pkg3`/`fss0`. Allows multiple and `,` as separator. The name must exactly match the name in `PKG3`. |
| exofatal={FILE path} | Replaces the exosphere fatal binary for Mariko |
| ---------------------- | ---------------------------------------------------------- |
| kip1patch=patchname | Enables a kip1 patch. Specify with multiple lines and/or in one line with `,` as separator. If actual patch is not found, a warning will show up |
| kip1patch=patchname | Enables a kip1 patch. Allows multiple and `,` as separator. If actual patch is not found, a warning will show up. |
| emupath={FOLDER path} | Forces emuMMC to use the selected one. (=emuMMC/RAW1, =emuMMC/SD00, etc). emuMMC must be created by hekate because it uses the raw_based/file_based files. |
| emummcforce=1 | Forces the use of emuMMC. If emummc.ini is disabled or not found, then it causes an error. |
| emummc_force_disable=1 | Disables emuMMC, if it's enabled. |
@@ -121,6 +122,7 @@ There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Capti
| ram_oc_vdd2=1100 | L4T RAM VDD2 Voltage. Set VDD2 (T210B01) or VDD2/VDDQ (T210) voltage. 1050-1175. |
| ram_oc_vddq=600 | L4T RAM VDDQ Voltage. Set VDDQ (T210B01). 550-650. |
| uart_port=0 | Enables logging on serial port for L4T uboot/kernel. |
| sld_type=0x31444C53 | Controls the type of seamless display support. 0x0: Disable, 0x31444C53: L4T seamless display. |
| Additional keys | Each distro supports more keys. Check README_CONFIG.txt for more info. |
| ---------------------- | ---------------------------------------------------------- |
| bootwait=3 | Overrides global bootwait from `[config]`. |
@@ -134,8 +136,8 @@ There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Capti
**Note2**: When using PKG3/FSS0 it parses exosphere, warmboot and all core kips. You can override the first 2 by using `secmon`/`warmboot` after defining `pkg3`/`fss0`.
You can define `kip1` to load an extra kip or many via the wildcard (`/*`) usage.
**Warning**: Careful when you define *pkg3/fss core* kips when using `pkg3`/`fss0` or the folder (when using `/*`) includes them.
That's in case the kips are incompatible between them. If compatible, you can override `pkg3`/`fss0` kips with no issues (useful for testing with intermediate kip changes). In such cases, the `kip1` line must be after `pkg3`/`fss0` line.
**Warning**: Careful when you override *pkg3/fss core* kips with `kip1`.
That's in case the kips are incompatible between them. If compatible, you can override `pkg3`/`fss0` kips with no issues (useful for testing with intermediate kip changes). In such cases, the `kip1` line must be **after** `pkg3`/`fss0` line.
### Boot entry key/value combinations for Exosphère:

View File

@@ -1,11 +1,11 @@
# IPL Version.
BLVERSION_MAJOR := 6
BLVERSION_MINOR := 2
BLVERSION_HOTFX := 2
BLVERSION_MINOR := 3
BLVERSION_HOTFX := 1
BLVERSION_REL := 0
# Nyx Version.
NYXVERSION_MAJOR := 1
NYXVERSION_MINOR := 6
NYXVERSION_HOTFX := 4
NYXVERSION_MINOR := 7
NYXVERSION_HOTFX := 0
NYXVERSION_REL := 0

View File

@@ -124,6 +124,7 @@ static const u8 master_kekseed_t210_tsec_v4[HOS_KB_VERSION_MAX - HOS_KB_VERSION_
{ 0x71, 0xB9, 0xA6, 0xC0, 0xFF, 0x97, 0x6B, 0x0C, 0xB4, 0x40, 0xB9, 0xD5, 0x81, 0x5D, 0x81, 0x90 }, // 17.0.0.
{ 0x00, 0x04, 0x5D, 0xF0, 0x4D, 0xCD, 0x14, 0xA3, 0x1C, 0xBF, 0xDE, 0x48, 0x55, 0xBA, 0x35, 0xC1 }, // 18.0.0.
{ 0xD7, 0x63, 0x74, 0x46, 0x4E, 0xBA, 0x78, 0x0A, 0x7C, 0x9D, 0xB3, 0xE8, 0x7A, 0x3D, 0x71, 0xE3 }, // 19.0.0.
{ 0xA1, 0x7D, 0x34, 0xDB, 0x2D, 0x9D, 0xDA, 0xE5, 0xF8, 0x15, 0x63, 0x4C, 0x8F, 0xE7, 0x6C, 0xD8 }, // 20.0.0.
};
//!TODO: Update on mkey changes.
@@ -142,6 +143,7 @@ static const u8 master_kekseed_t210b01[HOS_KB_VERSION_MAX - HOS_KB_VERSION_600 +
{ 0x8D, 0xEE, 0x9E, 0x11, 0x36, 0x3A, 0x9B, 0x0A, 0x6A, 0xC7, 0xBB, 0xE9, 0xD1, 0x03, 0xF7, 0x80 }, // 17.0.0.
{ 0x4F, 0x41, 0x3C, 0x3B, 0xFB, 0x6A, 0x01, 0x2A, 0x68, 0x9F, 0x83, 0xE9, 0x53, 0xBD, 0x16, 0xD2 }, // 18.0.0.
{ 0x31, 0xBE, 0x25, 0xFB, 0xDB, 0xB4, 0xEE, 0x49, 0x5C, 0x77, 0x05, 0xC2, 0x36, 0x9F, 0x34, 0x80 }, // 19.0.0.
{ 0x1A, 0x31, 0x62, 0x87, 0xA8, 0x09, 0xCA, 0xF8, 0x69, 0x15, 0x45, 0xC2, 0x6B, 0xAA, 0x5A, 0x8A }, // 20.0.0.
};
static const u8 console_keyseed[SE_KEY_128_SIZE] =

View File

@@ -46,7 +46,8 @@ enum {
HOS_KB_VERSION_1700 = 16,
HOS_KB_VERSION_1800 = 17,
HOS_KB_VERSION_1900 = 18,
HOS_KB_VERSION_MAX = HOS_KB_VERSION_1900
HOS_KB_VERSION_2000 = 19,
HOS_KB_VERSION_MAX = HOS_KB_VERSION_2000
};
#define HOS_TSEC_VERSION 4 //! TODO: Update on TSEC Root Key changes.

View File

@@ -171,7 +171,8 @@ static const pkg1_id_t _pkg1_ids[] = {
{ "20230111", 15, 18, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 16.0.0 - 16.1.0.
{ "20230906", 16, 19, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 17.0.0 - 17.0.1.
{ "20240207", 17, 19, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 18.0.0 - 18.1.0.
{ "20240808", 18, 20, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 19.0.0+
{ "20240808", 18, 20, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 19.0.0 - 19.0.1.
{ "20250206", 19, 21, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000, NULL }, // 20.0.0+
};
const pkg1_id_t *pkg1_get_latest()

View File

@@ -686,6 +686,10 @@ const char *pkg2_patch_kips(link_t *info, char *patch_names)
return patches[i];
}
// Check if emuMMC was applied.
if (emummc_patch_selected)
return "emummc";
return NULL;
}

View File

@@ -818,6 +818,30 @@ static const kip1_patchset_t _fs_patches_1900_exfat[] = {
{ NULL, NULL }
};
static const kip1_patch_t _fs_nogc_2000[] = {
{ KPS(KIP_TEXT) | 0x17C150, 8, KIP1_PATCH_SRC_NO_CHECK, "\xE0\x03\x1F\x2A\xC0\x03\x5F\xD6" },
{ KPS(KIP_TEXT) | 0x1A7D24, 4, KIP1_PATCH_SRC_NO_CHECK, "\x14\x80\x80\x52" },
{ KPS(KIP_TEXT) | 0x1A7F24, 4, KIP1_PATCH_SRC_NO_CHECK, "\x16\x80\x80\x52" },
{ 0, 0, NULL, NULL }
};
static const kip1_patchset_t _fs_patches_2000[] = {
{ "nogc", _fs_nogc_2000 },
{ NULL, NULL }
};
static const kip1_patch_t _fs_nogc_2000_exfat[] = {
{ KPS(KIP_TEXT) | 0x187A70, 8, KIP1_PATCH_SRC_NO_CHECK, "\xE0\x03\x1F\x2A\xC0\x03\x5F\xD6" },
{ KPS(KIP_TEXT) | 0x1B3644, 4, KIP1_PATCH_SRC_NO_CHECK, "\x14\x80\x80\x52" },
{ KPS(KIP_TEXT) | 0x1B3844, 4, KIP1_PATCH_SRC_NO_CHECK, "\x16\x80\x80\x52" },
{ 0, 0, NULL, NULL }
};
static const kip1_patchset_t _fs_patches_2000_exfat[] = {
{ "nogc", _fs_nogc_2000_exfat },
{ NULL, NULL }
};
// SHA256 hashes.
static const kip1_id_t _kip_ids[] =
{
@@ -883,4 +907,8 @@ static const kip1_id_t _kip_ids[] =
{ "FS", "\x20\x4C\xBA\x86\xDE\x08\x44\x6A", _fs_patches_1800_exfat }, // FS 18.1.0 exFAT
{ "FS", "\xD9\x4C\x68\x15\xF8\xF5\x0A\x20", _fs_patches_1900 }, // FS 19.0.0
{ "FS", "\xED\xA8\x78\x68\xA4\x49\x07\x50", _fs_patches_1900_exfat }, // FS 19.0.0 exFAT
{ "FS", "\x63\x54\x96\x9E\x60\xA7\x97\x7B", _fs_patches_2000 }, // FS 20.0.0
{ "FS", "\x47\x41\x07\x10\x65\x4F\xA4\x3F", _fs_patches_2000_exfat }, // FS 20.0.0 exFAT
{ "FS", "\xED\x34\xB4\x50\x58\x4A\x5B\x43", _fs_patches_2000 }, // FS 20.1.0
{ "FS", "\xA5\x1A\xA4\x92\x6C\x41\x87\x59", _fs_patches_2000_exfat }, // FS 20.1.0 exFAT
};

View File

@@ -199,7 +199,7 @@ void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base)
case 12:
exo_fw_no = EXO_FW_VER(9, 1);
break;
case 13 ... 22: //!TODO: Update on API changes. 22: 19.0.0.
case 13 ... 23: //!TODO: Update on API changes. 23: 20.0.0.
exo_fw_no = EXO_FW_VER(exo_fw_no - 3, ctxt->exo_ctx.hos_revision);
break;
}

View File

@@ -889,7 +889,7 @@ static void _l4t_set_config(l4t_ctxt_t *ctxt, const ini_sec_t *ini_sec, int entr
else if (!strcmp("uart_port", kv->key))
ctxt->serial_port = atoi(kv->val);
else if (!strcmp("sld_type", kv->key))
ctxt->sld_type = atoi(kv->val);
ctxt->sld_type = strtol(kv->val, NULL, 16);
// Set key/val to BL33 env.
_l4t_bl33_cfg_set_key(bl33_env, kv->key, kv->val);

View File

@@ -1354,7 +1354,7 @@ static void _about()
{
static const char credits[] =
"\nhekate (c) 2018, naehrwert, st4rk\n\n"
" (c) 2018-2024, CTCaer\n\n"
" (c) 2018-2025, CTCaer\n\n"
" ___________________________________________\n\n"
"Thanks to: %kderrek, nedwill, plutoo,\n"
" shuffle2, smea, thexyz, yellows8%k\n"
@@ -1450,7 +1450,7 @@ ment_t ment_top[] = {
MDEF_END()
};
menu_t menu_top = { ment_top, "hekate v6.2.2", 0, 0 };
menu_t menu_top = { ment_top, "hekate v6.3.1", 0, 0 };
extern void pivot_stack(u32 stack_top);

View File

@@ -46,7 +46,7 @@ clean:
@rm -rf $(OBJS)
$(TARGET).bin: $(BUILDDIR)/$(TARGET)/$(TARGET).elf
$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$(PAYLOAD_NAME).bin
@$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$(PAYLOAD_NAME).bin
$(BUILDDIR)/$(TARGET)/$(TARGET).elf: $(OBJS)
@$(CC) $(LDFLAGS) -T link.ld $^ -o $@

View File

@@ -107,7 +107,7 @@ LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections -Xlinker --defs
all: $(TARGET).bin
@echo "--------------------------------------"
@echo -n "Nyx size: "
@echo -n "Nyx size: "
$(eval BIN_SIZE = $(shell wc -c < $(OUTPUTDIR)/$(TARGET).bin))
@echo $(BIN_SIZE)" Bytes"
@echo "--------------------------------------"
@@ -118,11 +118,11 @@ clean:
@rm -rf $(OUTPUTDIR)
$(TARGET).bin: $(BUILDDIR)/$(TARGET)/$(TARGET).elf
$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$@
@$(OBJCOPY) -S -O binary $< $(OUTPUTDIR)/$@
$(BUILDDIR)/$(TARGET)/$(TARGET).elf: $(OBJS)
@$(CC) $(LDFLAGS) -T $(SOURCEDIR)/link.ld $^ -o $@
@echo "Nyx was built with the following flags:\nCFLAGS: "$(CFLAGS)"\nLDFLAGS: "$(LDFLAGS)
@printf "$(TARGET) was built with the following flags:\nCFLAGS: $(CFLAGS)\nLDFLAGS: $(LDFLAGS)\n"
$(BUILDDIR)/$(TARGET)/%.o: %.c
@echo Building $@

View File

@@ -1,6 +1,16 @@
# Nyx - Background - Icons
The background for Nyx, must be a 1280 x 720 32-bit BMP. Alpha blending is taken into account. For that reason, if a solid background is required, that value must be 0xFF. There are sites that can produce the correct bmp.
The background for Nyx must be a 1280 x 720 32-bit BMP. Alpha blending is taken into account. For that reason, if a solid background is required, that value must be 0xFF. There are sites that can produce the correct bmp.
You can now provide section-specific backgrounds by placing any of the following files in `bootloader/res/`:
- `background_about.bmp`
- `background_home.bmp`
- `background_tools.bmp`
- `background_info.bmp`
- `background_options.bmp`
If a section-specific file is missing, Nyx will first try `background_etc.bmp` (shared across every non-Home tab) and then fall back to `background.bmp` when available.
The icons supported are 192 x 192 32-bit BMP. You can utilize transparency at will and make nice mixes with the button background.

View File

@@ -53,6 +53,48 @@ lv_img_dsc_t *icon_payload;
lv_img_dsc_t *icon_lakka;
lv_img_dsc_t *hekate_bg;
lv_img_dsc_t *hekate_bg_generic;
lv_img_dsc_t *hekate_bg_tabs[NYX_BG_TAB_MAX];
static lv_obj_t *nyx_bg_container;
static lv_obj_t *nyx_bg_img;
static lv_img_dsc_t *_nyx_get_tab_background(uint16_t tab_idx);
bool nyx_tab_has_background(enum nyx_bg_tab tab)
{
return _nyx_get_tab_background((uint16_t)tab) != NULL;
}
static bool _nyx_any_background(void)
{
if (hekate_bg || hekate_bg_generic)
return true;
for (int i = 0; i < NYX_BG_TAB_MAX; i++)
{
if (hekate_bg_tabs[i])
return true;
}
return false;
}
static lv_img_dsc_t *_nyx_get_tab_background(uint16_t tab_idx)
{
if (tab_idx < NYX_BG_TAB_MAX && hekate_bg_tabs[tab_idx])
return hekate_bg_tabs[tab_idx];
if (tab_idx == NYX_BG_TAB_HOME)
return hekate_bg ? hekate_bg : hekate_bg_generic;
if (hekate_bg_generic)
return hekate_bg_generic;
return hekate_bg;
}
static void _nyx_apply_tab_background(uint16_t tab_idx);
lv_style_t btn_transp_rel, btn_transp_pr, btn_transp_tgl_rel, btn_transp_tgl_pr;
lv_style_t ddlist_transp_bg, ddlist_transp_sel;
@@ -1217,7 +1259,7 @@ static void _create_text_button(lv_theme_t *th, lv_obj_t *parent, lv_obj_t *btn,
btn_onoff_rel_hos_style.body.empty = 1;
lv_style_copy(&btn_onoff_pr_hos_style, &btn_onoff_rel_hos_style);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_OPTIONS))
{
btn_onoff_pr_hos_style.body.main_color = LV_COLOR_HEX(0xFFFFFF);
btn_onoff_pr_hos_style.body.opa = 35;
@@ -1448,7 +1490,6 @@ typedef struct _launch_menu_entries_t
static launch_menu_entries_t launch_ctxt;
static lv_obj_t *launch_bg = NULL;
static bool launch_bg_done = false;
static lv_res_t _launch_more_cfg_action(lv_obj_t *btn)
{
@@ -1484,13 +1525,12 @@ static lv_res_t _win_launch_close_action(lv_obj_t * btn)
lv_obj_del(win);
if (n_cfg.home_screen && !launch_bg_done && hekate_bg)
if (n_cfg.home_screen && launch_bg && nyx_tab_has_background(NYX_BG_TAB_HOME))
{
lv_obj_set_opa_scale_enable(launch_bg, true);
lv_obj_set_opa_scale(launch_bg, LV_OPA_TRANSP);
//if (launch_bg)
// lv_obj_del(launch_bg); //! TODO: Find why it hangs.
launch_bg_done = true;
}
close_btn = NULL;
@@ -1506,12 +1546,16 @@ static lv_obj_t *create_window_launch(const char *win_title)
win_bg_style.body.main_color = lv_theme_get_current()->bg->body.main_color;
win_bg_style.body.grad_color = win_bg_style.body.main_color;
if (n_cfg.home_screen && !launch_bg_done && hekate_bg)
if (n_cfg.home_screen && nyx_tab_has_background(NYX_BG_TAB_HOME))
{
lv_obj_t *img = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img, hekate_bg);
launch_bg = img;
lv_img_dsc_t *bg = _nyx_get_tab_background(NYX_BG_TAB_HOME);
if (!launch_bg)
launch_bg = lv_img_create(lv_scr_act(), NULL);
else
lv_obj_set_parent(launch_bg, lv_scr_act());
lv_img_set_src(launch_bg, bg);
lv_obj_set_opa_scale_enable(launch_bg, false);
lv_obj_set_opa_scale(launch_bg, LV_OPA_COVER);
}
lv_obj_t *win = lv_win_create(lv_scr_act(), NULL);
@@ -1519,7 +1563,7 @@ static lv_obj_t *create_window_launch(const char *win_title)
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
if (n_cfg.home_screen && !launch_bg_done && hekate_bg)
if (n_cfg.home_screen && nyx_tab_has_background(NYX_BG_TAB_HOME))
{
lv_style_copy(&win_header, lv_theme_get_current()->win.header);
win_header.body.opa = LV_OPA_TRANSP;
@@ -1974,7 +2018,7 @@ static void _create_tab_home(lv_theme_t *th, lv_obj_t *parent)
// Launch button.
lv_obj_t *btn_launch = lv_btn_create(parent, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_HOME))
{
lv_btn_set_style(btn_launch, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn_launch, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -2200,6 +2244,8 @@ void nyx_check_ini_changes()
static lv_res_t _show_hide_save_button(lv_obj_t *tv, uint16_t tab_idx)
{
_nyx_apply_tab_background(tab_idx);
if (tab_idx == 4) // Options.
{
lv_btn_set_action(status_bar.mid, LV_BTN_ACTION_CLICK, _save_options_action);
@@ -2217,6 +2263,29 @@ static lv_res_t _show_hide_save_button(lv_obj_t *tv, uint16_t tab_idx)
return LV_RES_OK;
}
static void _nyx_apply_tab_background(uint16_t tab_idx)
{
if (!nyx_bg_container)
return;
lv_img_dsc_t *bg = _nyx_get_tab_background(tab_idx);
if (!bg)
{
if (nyx_bg_img)
{
lv_obj_del(nyx_bg_img);
nyx_bg_img = NULL;
}
return;
}
if (!nyx_bg_img)
nyx_bg_img = lv_img_create(nyx_bg_container, NULL);
lv_img_set_src(nyx_bg_img, bg);
}
static void _nyx_set_default_styles(lv_theme_t * th)
{
lv_style_copy(&mbox_darken, &lv_style_plain);
@@ -2321,16 +2390,11 @@ static void _nyx_main_menu(lv_theme_t * th)
base_bg_style.body.grad_color = base_bg_style.body.main_color;
lv_cont_set_style(cnr, &base_bg_style);
lv_obj_set_size(cnr, LV_HOR_RES, LV_VER_RES);
if (hekate_bg)
{
lv_obj_t *img = lv_img_create(cnr, NULL);
lv_img_set_src(img, hekate_bg);
}
nyx_bg_container = cnr;
// Add tabview page to screen.
lv_obj_t *tv = lv_tabview_create(scr, NULL);
if (hekate_bg)
if (_nyx_any_background())
{
lv_tabview_set_style(tv, LV_TABVIEW_STYLE_BTN_PR, &tabview_btn_pr);
lv_tabview_set_style(tv, LV_TABVIEW_STYLE_BTN_TGL_PR, &tabview_btn_tgl_pr);
@@ -2356,6 +2420,8 @@ static void _nyx_main_menu(lv_theme_t * th)
lv_page_set_style(tab_info, LV_PAGE_STYLE_SCRL, &no_padding);
lv_obj_t *tab_options = lv_tabview_add_tab(tv, SYMBOL_SETTINGS" Options");
lv_page_set_style(tab_options, LV_PAGE_STYLE_BG, &no_padding);
lv_page_set_style(tab_options, LV_PAGE_STYLE_SCRL, &no_padding);
_create_tab_about(th, tab_about);
_create_tab_home(th, tab_home);
@@ -2364,6 +2430,7 @@ static void _nyx_main_menu(lv_theme_t * th)
create_tab_options(th, tab_options);
lv_tabview_set_tab_act(tv, 1, false);
_nyx_apply_tab_background(lv_tabview_get_tab_act(tv));
// Create status bar.
_create_status_bar(th);

View File

@@ -58,6 +58,20 @@ extern lv_img_dsc_t *icon_payload;
extern lv_img_dsc_t *icon_lakka;
extern lv_img_dsc_t *hekate_bg;
extern lv_img_dsc_t *hekate_bg_generic;
enum nyx_bg_tab {
NYX_BG_TAB_ABOUT = 0,
NYX_BG_TAB_HOME,
NYX_BG_TAB_TOOLS,
NYX_BG_TAB_INFO,
NYX_BG_TAB_OPTIONS,
NYX_BG_TAB_MAX
};
extern lv_img_dsc_t *hekate_bg_tabs[NYX_BG_TAB_MAX];
bool nyx_tab_has_background(enum nyx_bg_tab tab);
extern lv_style_t btn_transp_rel, btn_transp_pr, btn_transp_tgl_rel, btn_transp_tgl_pr;
extern lv_style_t ddlist_transp_bg, ddlist_transp_sel;

View File

@@ -612,7 +612,10 @@ static lv_res_t _create_window_hw_info_status(lv_obj_t *btn)
strcpy(fuses_hos_version, "17.0.0 - 18.1.0");
break;
case 20:
strcpy(fuses_hos_version, "19.0.0+");
strcpy(fuses_hos_version, "19.0.0 - 19.0.1");
break;
case 21:
strcpy(fuses_hos_version, "20.0.0+");
break;
case 255:
strcpy(fuses_hos_version, "#FFD000 Overburnt#");
@@ -2263,47 +2266,29 @@ static lv_res_t _create_window_sdcard_info_status(lv_obj_t *btn)
lv_obj_set_size(desc3, LV_HOR_RES / 2 / 2 * 2, LV_VER_RES - (LV_DPI * 11 / 8) * 4);
lv_obj_t * lb_desc3 = lv_label_create(desc3, lb_desc);
lv_label_set_text(lb_desc3, "#D4FF00 Acquiring FAT volume info...#");
lv_label_set_text(lb_desc3, "#D4FF00 Acquiring info...#");
lv_obj_set_width(lb_desc3, lv_obj_get_width(desc3));
lv_obj_align(desc3, desc, LV_ALIGN_OUT_BOTTOM_LEFT, 0, LV_DPI / 2);
manual_system_maintenance(true);
f_getfree("", &sd_fs.free_clst, NULL);
lv_label_set_text(lb_desc3,
"#00DDFF Found FAT FS:#\n"
"Filesystem:\n"
"Cluster:\n"
"Size free/total:"
);
lv_obj_set_size(desc3, LV_HOR_RES / 2 / 6 * 2, LV_VER_RES - (LV_DPI * 11 / 8) * 4);
lv_obj_set_width(lb_desc3, lv_obj_get_width(desc3));
lv_obj_align(desc3, desc, LV_ALIGN_OUT_BOTTOM_LEFT, 0, LV_DPI / 2);
lv_obj_t *val3 = lv_cont_create(win, NULL);
lv_obj_set_size(val3, LV_HOR_RES / 12 * 3, LV_VER_RES - (LV_DPI * 11 / 8) * 4);
lv_obj_t * lb_val3 = lv_label_create(val3, lb_desc);
lv_label_set_text(lb_val3, "");
s_printf(txt_buf, "\n%s\n%d %s\n%d/%d MiB",
sd_fs.fs_type == FS_EXFAT ? ("exFAT "SYMBOL_SHRK) : ("FAT32"),
(sd_fs.csize > 1) ? (sd_fs.csize >> 1) : SD_BLOCKSIZE,
(sd_fs.csize > 1) ? "KiB" : "B",
(u32)(sd_fs.free_clst * sd_fs.csize >> SECTORS_TO_MIB_COEFF),
(u32)(sd_fs.n_fatent * sd_fs.csize >> SECTORS_TO_MIB_COEFF));
lv_label_set_text(lb_val3, txt_buf);
lv_obj_set_width(lb_val3, lv_obj_get_width(val3));
lv_obj_align(val3, desc3, LV_ALIGN_OUT_RIGHT_MID, 0, 0);
lv_obj_t *desc4 = lv_cont_create(win, NULL);
lv_obj_set_size(desc4, LV_HOR_RES / 2 / 2 * 2, LV_VER_RES - (LV_DPI * 11 / 8) * 4);
lv_obj_t * lb_desc4 = lv_label_create(desc4, lb_desc);
lv_label_set_text(lb_desc4, "#D4FF00 Acquiring FAT volume info...#");
lv_label_set_text(lb_desc4, " ");
lv_obj_set_width(lb_desc4, lv_obj_get_width(desc4));
lv_label_set_text(lb_desc4,
@@ -2332,6 +2317,30 @@ static lv_res_t _create_window_sdcard_info_status(lv_obj_t *btn)
lv_obj_set_width(lb_val4, lv_obj_get_width(val4));
lv_obj_align(val4, desc4, LV_ALIGN_OUT_RIGHT_MID, 0, 0);
manual_system_maintenance(true);
f_getfree("", &sd_fs.free_clst, NULL);
lv_label_set_text(lb_desc3,
"#00DDFF Found FAT FS:#\n"
"Filesystem:\n"
"Cluster:\n"
"Size free/total:"
);
lv_obj_set_width(lb_desc3, lv_obj_get_width(desc3));
s_printf(txt_buf, "\n%s\n%d %s\n%d/%d MiB",
sd_fs.fs_type == FS_EXFAT ? ("exFAT "SYMBOL_SHRK) : ("FAT32"),
(sd_fs.csize > 1) ? (sd_fs.csize >> 1) : SD_BLOCKSIZE,
(sd_fs.csize > 1) ? "KiB" : "B",
(u32)(sd_fs.free_clst * sd_fs.csize >> SECTORS_TO_MIB_COEFF),
(u32)(sd_fs.n_fatent * sd_fs.csize >> SECTORS_TO_MIB_COEFF));
lv_label_set_text(lb_val3, txt_buf);
lv_obj_set_width(lb_val3, lv_obj_get_width(val3));
free(txt_buf);
sd_unmount();
@@ -2650,7 +2659,7 @@ void create_tab_info(lv_theme_t *th, lv_obj_t *parent)
// Create Bootrom button.
lv_obj_t *btn = lv_btn_create(h1, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_INFO))
{
lv_btn_set_style(btn, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -2746,7 +2755,7 @@ void create_tab_info(lv_theme_t *th, lv_obj_t *parent)
// Create eMMC button.
lv_obj_t *btn5 = lv_btn_create(h2, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_INFO))
{
lv_btn_set_style(btn5, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn5, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -2778,7 +2787,7 @@ void create_tab_info(lv_theme_t *th, lv_obj_t *parent)
// Create Battery button.
lv_obj_t *btn7 = lv_btn_create(h2, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_INFO))
{
lv_btn_set_style(btn7, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn7, LV_BTN_STYLE_PR, &btn_transp_pr);

View File

@@ -1397,7 +1397,7 @@ void create_tab_options(lv_theme_t *th, lv_obj_t *parent)
// Create Auto Boot button.
lv_obj_t *btn = lv_btn_create(sw_h2, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_OPTIONS))
{
lv_btn_set_style(btn, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -1448,7 +1448,7 @@ void create_tab_options(lv_theme_t *th, lv_obj_t *parent)
lv_ddlist_set_action(ddlist, _autoboot_delay_action);
lv_ddlist_set_selected(ddlist, h_cfg.bootwait);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_OPTIONS))
{
lv_ddlist_set_style(ddlist, LV_DDLIST_STYLE_BG, &ddlist_transp_bg);
lv_ddlist_set_style(ddlist, LV_DDLIST_STYLE_BGO, &ddlist_transp_bg);

View File

@@ -1462,7 +1462,7 @@ static void _create_tab_tools_emmc_pkg12(lv_theme_t *th, lv_obj_t *parent)
// Create Backup eMMC button.
lv_obj_t *btn = lv_btn_create(h1, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_TOOLS))
{
lv_btn_set_style(btn, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -1517,7 +1517,7 @@ static void _create_tab_tools_emmc_pkg12(lv_theme_t *th, lv_obj_t *parent)
// Create Partition SD Card button.
lv_obj_t *btn3 = lv_btn_create(h2, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_TOOLS))
{
lv_btn_set_style(btn3, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn3, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -1580,7 +1580,7 @@ static void _create_tab_tools_arc_autorcm(lv_theme_t *th, lv_obj_t *parent)
// Create fix archive bit button.
lv_obj_t *btn = lv_btn_create(h1, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_TOOLS))
{
lv_btn_set_style(btn, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn, LV_BTN_STYLE_PR, &btn_transp_pr);
@@ -1633,7 +1633,7 @@ static void _create_tab_tools_arc_autorcm(lv_theme_t *th, lv_obj_t *parent)
// Create AutoRCM On/Off button.
lv_obj_t *btn3 = lv_btn_create(h2, NULL);
if (hekate_bg)
if (nyx_tab_has_background(NYX_BG_TAB_TOOLS))
{
lv_btn_set_style(btn3, LV_BTN_STYLE_REL, &btn_transp_rel);
lv_btn_set_style(btn3, LV_BTN_STYLE_PR, &btn_transp_pr);

View File

@@ -2,7 +2,7 @@
* Copyright (c) 2018 naehrwert
* Copyright (c) 2018 st4rk
* Copyright (c) 2018 Ced2911
* Copyright (c) 2018-2024 CTCaer
* Copyright (c) 2018-2025 CTCaer
* Copyright (c) 2018 balika011
*
* This program is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@ static const u8 master_kekseed_620[SE_KEY_128_SIZE] =
//!TODO: Update on mkey changes.
static const u8 master_kekseed_t210_max[SE_KEY_128_SIZE] =
{ 0xD7, 0x63, 0x74, 0x46, 0x4E, 0xBA, 0x78, 0x0A, 0x7C, 0x9D, 0xB3, 0xE8, 0x7A, 0x3D, 0x71, 0xE3 }; // 19.0.0.
{ 0xA1, 0x7D, 0x34, 0xDB, 0x2D, 0x9D, 0xDA, 0xE5, 0xF8, 0x15, 0x63, 0x4C, 0x8F, 0xE7, 0x6C, 0xD8 }; // 20.0.0.
//!TODO: Update on mkey changes.
static const u8 master_kekseed_t210b01[HOS_KB_VERSION_MAX - HOS_KB_VERSION_600 + 1][SE_KEY_128_SIZE] = {
@@ -94,6 +94,7 @@ static const u8 master_kekseed_t210b01[HOS_KB_VERSION_MAX - HOS_KB_VERSION_600 +
{ 0x8D, 0xEE, 0x9E, 0x11, 0x36, 0x3A, 0x9B, 0x0A, 0x6A, 0xC7, 0xBB, 0xE9, 0xD1, 0x03, 0xF7, 0x80 }, // 17.0.0.
{ 0x4F, 0x41, 0x3C, 0x3B, 0xFB, 0x6A, 0x01, 0x2A, 0x68, 0x9F, 0x83, 0xE9, 0x53, 0xBD, 0x16, 0xD2 }, // 18.0.0.
{ 0x31, 0xBE, 0x25, 0xFB, 0xDB, 0xB4, 0xEE, 0x49, 0x5C, 0x77, 0x05, 0xC2, 0x36, 0x9F, 0x34, 0x80 }, // 19.0.0.
{ 0x1A, 0x31, 0x62, 0x87, 0xA8, 0x09, 0xCA, 0xF8, 0x69, 0x15, 0x45, 0xC2, 0x6B, 0xAA, 0x5A, 0x8A }, // 20.0.0.
};
static const u8 console_keyseed[SE_KEY_128_SIZE] =
@@ -126,6 +127,7 @@ static const u8 mkey_vectors[HOS_KB_VERSION_MAX + 1][SE_KEY_128_SIZE] = {
{ 0x25, 0x12, 0x8B, 0xCB, 0xB5, 0x46, 0xA1, 0xF8, 0xE0, 0x52, 0x15, 0xB7, 0x0B, 0x57, 0x00, 0xBD }, // Mkey 15 encrypted with mkey 16.
{ 0x58, 0x15, 0xD2, 0xF6, 0x8A, 0xE8, 0x19, 0xAB, 0xFB, 0x2D, 0x52, 0x9D, 0xE7, 0x55, 0xF3, 0x93 }, // Mkey 16 encrypted with mkey 17.
{ 0x4A, 0x01, 0x3B, 0xC7, 0x44, 0x6E, 0x45, 0xBD, 0xE6, 0x5E, 0x2B, 0xEC, 0x07, 0x37, 0x52, 0x86 }, // Mkey 17 encrypted with mkey 18.
{ 0x97, 0xE4, 0x11, 0xAB, 0x22, 0x72, 0x1A, 0x1F, 0x70, 0x5C, 0x00, 0xB3, 0x96, 0x30, 0x05, 0x28 }, // Mkey 18 encrypted with mkey 19.
};
//!TODO: Update on mkey changes.
@@ -146,6 +148,7 @@ static const u8 new_console_keyseed[HOS_KB_VERSION_MAX - HOS_KB_VERSION_400 + 1]
{ 0xDA, 0xB9, 0xD6, 0x77, 0x52, 0x2D, 0x1F, 0x78, 0x73, 0xC9, 0x98, 0x5B, 0x06, 0xFE, 0xA0, 0x52 }, // 17.0.0 New Device Key Source.
{ 0x14, 0xF5, 0xA5, 0xD0, 0x73, 0x6D, 0x44, 0x80, 0x5F, 0x31, 0x5A, 0x8F, 0x1E, 0xD4, 0x0D, 0x63 }, // 18.0.0 New Device Key Source.
{ 0x07, 0x38, 0x9A, 0xEC, 0x9C, 0xBD, 0x50, 0x4A, 0x4C, 0x1F, 0x04, 0xDA, 0x40, 0x68, 0x29, 0xE3 }, // 19.0.0 New Device Key Source.
{ 0xA3, 0x6B, 0x0A, 0xB5, 0x6F, 0x57, 0x4C, 0x5E, 0x00, 0xFD, 0x56, 0x21, 0xF5, 0x06, 0x6B, 0xD1 }, // 20.0.0 New Device Key Source.
};
//!TODO: Update on mkey changes.
@@ -166,6 +169,7 @@ static const u8 new_console_kekseed[HOS_KB_VERSION_MAX - HOS_KB_VERSION_400 + 1]
{ 0x21, 0xD6, 0x35, 0xF1, 0x0F, 0x7A, 0xF0, 0x5D, 0xDF, 0x79, 0x1C, 0x7A, 0xE4, 0x32, 0x82, 0x9E }, // 17.0.0 New Device Keygen Source.
{ 0xE7, 0x85, 0x8C, 0xA2, 0xF4, 0x49, 0xCB, 0x07, 0xD1, 0x8E, 0x48, 0x1B, 0xE8, 0x1E, 0x28, 0x3B }, // 18.0.0 New Device Keygen Source.
{ 0x9B, 0xA5, 0xFD, 0x74, 0x7F, 0xCD, 0x23, 0xD1, 0xD9, 0xBD, 0x6C, 0x51, 0x72, 0x5F, 0x3D, 0x1F }, // 19.0.0 New Device Keygen Source.
{ 0xDA, 0xFB, 0x61, 0x39, 0x48, 0x2D, 0xC2, 0x7E, 0x0D, 0x8E, 0x8F, 0x98, 0x57, 0x20, 0xB8, 0x15 }, // 20.0.0 New Device Keygen Source.
};
static const u8 gen_keyseed[SE_KEY_128_SIZE] =
@@ -269,7 +273,7 @@ static void _hos_eks_save()
}
// Get keys.
u8 *keys = (u8 *)calloc(2, SZ_4K);
u8 *keys = (u8 *)zalloc(SZ_8K);
se_get_aes_keys(keys + SZ_4K, keys, SE_KEY_128_SIZE);
// Set magic and personalized info.
@@ -333,21 +337,6 @@ out:
}
}
int hos_keygen_t210b01(u32 kb)
{
// Use SBK as Device key 4x unsealer and KEK for mkey in T210B01 units.
se_aes_unwrap_key(10, 14, console_keyseed_4xx);
// Derive master key.
se_aes_unwrap_key(7, 12, master_kekseed_t210b01[kb - HOS_KB_VERSION_600]);
se_aes_unwrap_key(7, 7, master_keyseed_retail);
// Derive latest pkg2 key.
se_aes_unwrap_key(8, 7, package2_keyseed);
return 1;
}
int hos_keygen(void *keyblob, u32 kb, tsec_ctxt_t *tsec_ctxt)
{
u32 retries = 0;
@@ -358,8 +347,21 @@ int hos_keygen(void *keyblob, u32 kb, tsec_ctxt_t *tsec_ctxt)
if (kb > HOS_KB_VERSION_MAX)
return 0;
// Do Mariko keygen.
if (h_cfg.t210b01)
return hos_keygen_t210b01(kb);
{
// Use SBK as Device key 4x unsealer and KEK for mkey in T210B01 units.
se_aes_unwrap_key(10, 14, console_keyseed_4xx);
// Derive master key.
se_aes_unwrap_key(7, 12, master_kekseed_t210b01[kb - HOS_KB_VERSION_600]);
se_aes_unwrap_key(7, 7, master_keyseed_retail);
// Derive latest pkg2 key.
se_aes_unwrap_key(8, 7, package2_keyseed);
return 1;
}
// Do Erista keygen.

View File

@@ -46,7 +46,8 @@ enum {
HOS_KB_VERSION_1700 = 16,
HOS_KB_VERSION_1800 = 17,
HOS_KB_VERSION_1900 = 18,
HOS_KB_VERSION_MAX = HOS_KB_VERSION_1900
HOS_KB_VERSION_2000 = 19,
HOS_KB_VERSION_MAX = HOS_KB_VERSION_2000
};
#define HOS_TSEC_VERSION 4 //! TODO: Update on TSEC Root Key changes.

View File

@@ -67,7 +67,8 @@ static const pkg1_id_t _pkg1_ids[] = {
{ "20230111", 15, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 16.0.0 - 16.1.0.
{ "20230906", 16, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 17.0.0 - 17.0.1.
{ "20240207", 17, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 18.0.0 - 18.1.0.
{ "20240808", 18, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 19.0.0+
{ "20240808", 18, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 19.0.0 - 19.0.1.
{ "20250206", 19, 0x0E00, 0x6FE0, 0x40030000, 0x4003E000 }, // 20.0.0+
};
const pkg1_id_t *pkg1_identify(u8 *pkg1, char *build_date)

View File

@@ -115,6 +115,8 @@ static const u8 mkey_vector_7xx[HOS_KB_VERSION_MAX - HOS_KB_VERSION_810 + 1][SE_
{ 0x58, 0x15, 0xD2, 0xF6, 0x8A, 0xE8, 0x19, 0xAB, 0xFB, 0x2D, 0x52, 0x9D, 0xE7, 0x55, 0xF3, 0x93 },
// Master key 17 encrypted with 18. (18.0.0 with 19.0.0)
{ 0x4A, 0x01, 0x3B, 0xC7, 0x44, 0x6E, 0x45, 0xBD, 0xE6, 0x5E, 0x2B, 0xEC, 0x07, 0x37, 0x52, 0x86 },
// Master key 18 encrypted with 19. (19.0.0 with 20.0.0)
{ 0x97, 0xE4, 0x11, 0xAB, 0x22, 0x72, 0x1A, 0x1F, 0x70, 0x5C, 0x00, 0xB3, 0x96, 0x30, 0x05, 0x28 },
};
static bool _pkg2_key_unwrap_validate(pkg2_hdr_t *tmp_test, pkg2_hdr_t *hdr, u8 src_slot, u8 *mkey, const u8 *key_seed)

View File

@@ -326,6 +326,42 @@ static void nyx_load_bg_icons()
// Load background resource if any.
hekate_bg = bmp_to_lvimg_obj("bootloader/res/background.bmp");
hekate_bg_generic = bmp_to_lvimg_obj("bootloader/res/background_etc.bmp");
memset(hekate_bg_tabs, 0, sizeof(hekate_bg_tabs));
static const struct {
const char *path;
enum nyx_bg_tab tab;
} bg_sources[] = {
{ "bootloader/res/background_about.bmp", NYX_BG_TAB_ABOUT },
{ "bootloader/res/background_home.bmp", NYX_BG_TAB_HOME },
{ "bootloader/res/background_tools.bmp", NYX_BG_TAB_TOOLS },
{ "bootloader/res/background_info.bmp", NYX_BG_TAB_INFO },
{ "bootloader/res/background_options.bmp", NYX_BG_TAB_OPTIONS },
};
for (size_t i = 0; i < sizeof(bg_sources) / sizeof(bg_sources[0]); i++)
{
lv_img_dsc_t *img = bmp_to_lvimg_obj(bg_sources[i].path);
if (img)
hekate_bg_tabs[bg_sources[i].tab] = img;
}
if (!hekate_bg && hekate_bg_generic)
hekate_bg = hekate_bg_generic;
if (!hekate_bg)
{
for (int i = 0; i < NYX_BG_TAB_MAX; i++)
{
if (hekate_bg_tabs[i])
{
hekate_bg = hekate_bg_tabs[i];
break;
}
}
}
}
#define EXCP_EN_ADDR 0x4003FFFC