Update Readme + Fix Auto Update

This commit is contained in:
Kostas Missos 2018-08-23 04:27:49 +03:00
parent 0540128709
commit 6a554eec6c
3 changed files with 21 additions and 14 deletions

View file

@ -5,8 +5,6 @@ endif
include $(DEVKITARM)/base_rules include $(DEVKITARM)/base_rules
TARGET := hekate TARGET := hekate
BLVERSION_MAJOR := 3
BLVERSION_MINOR := 3
BUILD := build BUILD := build
OUTPUT := output OUTPUT := output
SOURCEDIR = bootloader SOURCEDIR = bootloader
@ -55,7 +53,6 @@ OBJS += $(addprefix $(BUILD)/$(TARGET)/, \
) )
ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork
CUSTOMDEFINES := -DBLVERSIONMJ=$(BLVERSION_MAJOR) -DBLVERSIONMN=$(BLVERSION_MINOR)
CUSTOMDEFINES := -DMENU_LOGO_ENABLE #-DDEBUG CUSTOMDEFINES := -DMENU_LOGO_ENABLE #-DDEBUG
CFLAGS = $(ARCH) -O2 -nostdlib -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall $(CUSTOMDEFINES) 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 LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections

View file

@ -6,9 +6,24 @@
Custom Nintendo Switch bootloader, firmware patcher, and more. 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. There are four possible type of entries. "**[ ]**": Boot entry, "**{ }**": Caption, "**#**": Comment, "*newline*": .ini cosmetic newline.

View file

@ -59,12 +59,8 @@
#include "ianos/ianos.h" #include "ianos/ianos.h"
#include "utils/dirlist.h" #include "utils/dirlist.h"
#ifndef BLVERSIONMJ #define BLVERSIONMJ 4
#define BLVERSIONMJ 9 #define BLVERSIONMN 0
#endif
#ifndef BLVERSIONMN
#define BLVERSIONMN 9
#endif
#define BOOTLOADER_UPDATED_MAGIC_ADDR 0x4003E000 #define BOOTLOADER_UPDATED_MAGIC_ADDR 0x4003E000
#define BOOTLOADER_UPDATED_MAGIC 0x424f4f54 #define BOOTLOADER_UPDATED_MAGIC 0x424f4f54
@ -1759,7 +1755,6 @@ void auto_launch_update()
else else
{ {
f_close(&fp); f_close(&fp);
*(vu32 *)BOOTLOADER_UPDATED_MAGIC_ADDR = BOOTLOADER_UPDATED_MAGIC;
//launch_payload("bootloader/update.bin", true); //launch_payload("bootloader/update.bin", true);
} }
@ -2075,6 +2070,8 @@ out:
void auto_launch_firmware() void auto_launch_firmware()
{ {
auto_launch_update();
u8 *BOOTLOGO = NULL; u8 *BOOTLOGO = NULL;
char *payload_path = NULL; char *payload_path = NULL;
@ -2101,8 +2098,6 @@ void auto_launch_firmware()
if (sd_mount()) if (sd_mount())
{ {
auto_launch_update();
if (ini_parse(&ini_sections, "bootloader/hekate_ipl.ini", false)) if (ini_parse(&ini_sections, "bootloader/hekate_ipl.ini", false))
{ {
u32 configEntry = 0; u32 configEntry = 0;