From 20c9b640d6a87843a51ebfc609c3544e1b3233dc Mon Sep 17 00:00:00 2001 From: d0k3 Date: Thu, 27 Jul 2017 14:26:59 +0200 Subject: [PATCH] Miscelaneous small fixes --- .gitignore | 1 + Makefile | 2 +- README.md | 2 +- source/nand/nand.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f1da6d8..e8a6898 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ *.dSYM/ # Build directories +/screeninit/build /build /output /release diff --git a/Makefile b/Makefile index a35ebe6..4572823 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INCLUDES := source source/common source/font source/filesys source/crypto source #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- -ARCH := -marm -mthumb-interwork -flto +ARCH := -mthumb -mthumb-interwork -flto CFLAGS := -g -Wall -Wextra -Wpedantic -Wcast-align -Wno-main -O2\ -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -std=gnu11\ diff --git a/README.md b/README.md index 1a49ff3..615aa0b 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ With the possibilites GodMode9 provides, not everything may be obvious at first * __Restore NAND dumps while keeping your A9LH / sighax installation intact__: Select `Restore SysNAND (safe)` from inside the A button menu. * __Restore / dump NAND partitions or even full NANDs__: Just take a look into the `S:` (or `E:`/ `I:`) drive. This is done the same as any other file operation. * __Transfer CTRNAND images between systems__: Transfer the file located at `S:/ctrnand_full.bin` (or `E:`/ `I:`). On the receiving system, press A, select `CTRNAND Options...`, then `Transfer to NAND`. -* __Embed an essential backup right into a NAND dump__: This is available in the A button menu for NAND dumps. Essential backups contain NAND header, `movable.sed`, `LocalFriendCodeSeed_B` and `SecureInfo_A`. +* __Embed an essential backup right into a NAND dump__: This is available in the A button menu for NAND dumps. Essential backups contain NAND header, `movable.sed`, `LocalFriendCodeSeed_B`, `SecureInfo_A`, NAND CID and OTP. If your local SysNAND does not contain an embedded backup, you will be asked to do one at startup. * __Actually use that extra NAND space__: You can setup a __bonus drive__ via the HOME menu, which will be available via drive letter `8:`. (Only available on systems that have the extra space.) # System file handling diff --git a/source/nand/nand.c b/source/nand/nand.c index b8b570d..68da57a 100644 --- a/source/nand/nand.c +++ b/source/nand/nand.c @@ -163,7 +163,7 @@ bool InitNandCrypto(void) // see: https://www.3dbrew.org/wiki/Memory_layout#ARM9_ITCM u64 TwlCustId = 0x80000000ULL | (*(vu64 *)0x01FFB808 ^ 0x8C267B7B358A6AFULL); u8 TwlKeyX[16] __attribute__((aligned(32))); - u32* TwlKeyXW = (u32*) TwlKeyX; + u32* TwlKeyXW = (u32*) (void*) TwlKeyX; TwlKeyXW[0] = (u32) (TwlCustId>>0); TwlKeyXW[1] = *(vu32*)0x01FFD3A8; // "NINT"