1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-06-29 00:48:43 +00:00

Fix booting on FW 12.0.0

This commit is contained in:
cathery 2021-04-19 18:31:16 +03:00
parent cf8d6d5b95
commit 7686597006
3 changed files with 10 additions and 21 deletions

View File

@ -45,7 +45,7 @@ Instead, clone the repository **recursively** using any git client you have. (Gi
Like all other switch projects, you need to have [devkitA64](https://switchbrew.org/wiki/Setting_up_Development_Environment) set up on your system.
For compatibility with the Atmosphere-libs dependency, this project currently uses a version of libnx at commit **[0d32a2c](https://github.com/switchbrew/libnx/commit/0d32a2c0d5343fe212a0957420d285c0ef44fb36)**. Clone the repository, checkout to that commit, and run `make install` to set it up.
For compatibility with the Atmosphere-libs dependency, this project currently uses a version of libnx at commit **[5509f8f](https://github.com/switchbrew/libnx/commit/5509f8f14bc87a41794855d2b965cf0c08e9dd6d)**. Clone the repository, checkout to that commit, and run `make install` to set it up.
If you have **Visual Studio Code**, you can open the project as a folder and run the build tasks from inside the program. It also has Intellisense configured for switch development, if you have DEVKITPRO correctly defined in your environment variables. Handy!

View File

@ -22,24 +22,9 @@ export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(filter-out $(notdir $(wildcard $(dir)/*.arch.*.c)) $(notdir $(wildcard $(dir)/*.board.*.c)) $(notdir $(wildcard $(dir)/*.os.*.c)), \
$(notdir $(wildcard $(dir)/*.c))))
CFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.arch.$(ATMOSPHERE_ARCH_NAME).c)))
CFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.board.$(ATMOSPHERE_BOARD_NAME).c)))
CFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.os.$(ATMOSPHERE_OS_NAME).c)))
CPPFILES := $(foreach dir,$(SOURCES),$(filter-out $(notdir $(wildcard $(dir)/*.arch.*.cpp)) $(notdir $(wildcard $(dir)/*.board.*.cpp)) $(notdir $(wildcard $(dir)/*.os.*.cpp)), \
$(notdir $(wildcard $(dir)/*.cpp))))
CPPFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.arch.$(ATMOSPHERE_ARCH_NAME).cpp)))
CPPFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.board.$(ATMOSPHERE_BOARD_NAME).cpp)))
CPPFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.os.$(ATMOSPHERE_OS_NAME).cpp)))
SFILES := $(foreach dir,$(SOURCES),$(filter-out $(notdir $(wildcard $(dir)/*.arch.*.s)) $(notdir $(wildcard $(dir)/*.board.*.s)) $(notdir $(wildcard $(dir)/*.os.*.s)), \
$(notdir $(wildcard $(dir)/*.s))))
SFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.arch.$(ATMOSPHERE_ARCH_NAME).s)))
SFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.board.$(ATMOSPHERE_BOARD_NAME).s)))
SFILES += $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.os.$(ATMOSPHERE_OS_NAME).s)))
CFILES := $(call FIND_SOURCE_FILES,$(SOURCES),c)
CPPFILES := $(call FIND_SOURCE_FILES,$(SOURCES),cpp)
SFILES := $(call FIND_SOURCE_FILES,$(SOURCES),s)
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))

View File

@ -54,7 +54,9 @@ namespace ams
extern "C" void __appInit(void)
{
ams::sm::DoWithSession([] {
R_ABORT_UNLESS(smInitialize());
// ams::sm::DoWithSession([]
{
//Initialize system firmware version
R_ABORT_UNLESS(setsysInitialize());
SetSysFirmwareVersion fw;
@ -68,7 +70,9 @@ extern "C" void __appInit(void)
R_ABORT_UNLESS(usbHsInitialize());
R_ABORT_UNLESS(pscmInitialize());
R_ABORT_UNLESS(fsInitialize());
});
}
// );
smExit();
R_ABORT_UNLESS(fsdevMountSdmc());
}