From 6a554eec6c5f60d072bc773031b092c75135b943 Mon Sep 17 00:00:00 2001 From: Kostas Missos Date: Thu, 23 Aug 2018 04:27:49 +0300 Subject: [PATCH] Update Readme + Fix Auto Update --- Makefile | 3 --- README.md | 19 +++++++++++++++++-- bootloader/main.c | 13 ++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 32559e2..8c5be23 100755 --- a/Makefile +++ b/Makefile @@ -5,8 +5,6 @@ endif include $(DEVKITARM)/base_rules TARGET := hekate -BLVERSION_MAJOR := 3 -BLVERSION_MINOR := 3 BUILD := build OUTPUT := output SOURCEDIR = bootloader @@ -55,7 +53,6 @@ OBJS += $(addprefix $(BUILD)/$(TARGET)/, \ ) ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork -CUSTOMDEFINES := -DBLVERSIONMJ=$(BLVERSION_MAJOR) -DBLVERSIONMN=$(BLVERSION_MINOR) CUSTOMDEFINES := -DMENU_LOGO_ENABLE #-DDEBUG CFLAGS = $(ARCH) -O2 -nostdlib -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall $(CUSTOMDEFINES) LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections diff --git a/README.md b/README.md index d9e53b9..565a2de 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,24 @@ Custom Nintendo Switch bootloader, firmware patcher, and more. -## IPL configuration +## Bootloader folders and files -The ipl can be configured via 'hekate_ipl.ini' (if it is present on the SD card). Each ini section represents a boot entry, except for the special section 'config' that controls the global configuration. +| Folder/File | Description | +| -------------------- | --------------------------------------------------------------------- | +| bootloader | Main folder. | +| \|__ bootlogo.bmp | It is used when custom is on and no logopath found. Can be skipped. | +| \|__ hekate_ipl.ini | Main bootloader configuration and boot entries. | +| \|__ update.bin | If newer, it is loaded at boot. For modchips. Can be skipped. | +| bootloader/ini/ | For individual inis. 'More configs...' menu. Autoboot is supported. | +| bootloader/sys/ | For system modules. | +| \|__ libsys_lp0.bso | LP0 (sleep mode) module. Important! | +| bootloader/payloads/ | For payloads. 'Payloads...' menu. Autoboot only supported by including them into an ini. All CFW bootloaders, tools, Linux payloads are supported. | +| bootloader/libtools/ | Future reserved | + + +## Bootloader configuration + +The bootloader can be configured via 'bootloader/hekate_ipl.ini' (if it is present on the SD card). Each ini section represents a boot entry, except for the special section 'config' that controls the global configuration. There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Caption, "**#**": Comment, "*newline*": .ini cosmetic newline. diff --git a/bootloader/main.c b/bootloader/main.c index 4a835e9..0be4783 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -59,12 +59,8 @@ #include "ianos/ianos.h" #include "utils/dirlist.h" -#ifndef BLVERSIONMJ - #define BLVERSIONMJ 9 -#endif -#ifndef BLVERSIONMN - #define BLVERSIONMN 9 -#endif +#define BLVERSIONMJ 4 +#define BLVERSIONMN 0 #define BOOTLOADER_UPDATED_MAGIC_ADDR 0x4003E000 #define BOOTLOADER_UPDATED_MAGIC 0x424f4f54 @@ -1759,7 +1755,6 @@ void auto_launch_update() else { f_close(&fp); - *(vu32 *)BOOTLOADER_UPDATED_MAGIC_ADDR = BOOTLOADER_UPDATED_MAGIC; //launch_payload("bootloader/update.bin", true); } @@ -2075,6 +2070,8 @@ out: void auto_launch_firmware() { + auto_launch_update(); + u8 *BOOTLOGO = NULL; char *payload_path = NULL; @@ -2101,8 +2098,6 @@ void auto_launch_firmware() if (sd_mount()) { - auto_launch_update(); - if (ini_parse(&ini_sections, "bootloader/hekate_ipl.ini", false)) { u32 configEntry = 0;