diff options
Diffstat (limited to 'src/SPI.cpp')
-rw-r--r-- | src/SPI.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SPI.cpp b/src/SPI.cpp index ca67234..c83a77c 100644 --- a/src/SPI.cpp +++ b/src/SPI.cpp @@ -119,6 +119,8 @@ u32 FixFirmwareLength(u32 originalLength) void LoadDefaultFirmware() { + Log(LogLevel::Debug, "Using default firmware image...\n"); + FirmwareLength = 0x20000; Firmware = new u8[FirmwareLength]; memset(Firmware, 0xFF, FirmwareLength); @@ -132,6 +134,10 @@ void LoadDefaultFirmware() Firmware[0x2F] = 0x0F; Firmware[0x1FD] = 0x01; Firmware[0x1FE] = 0x20; + Firmware[0x2FF] = 0x80; // boot0: use NAND as stage2 medium + + // these need to be zero (part of the stage2 firmware signature!) + memset(&Firmware[0x22], 0, 8); } else { @@ -338,6 +344,8 @@ void Reset() else FirmwarePath = Platform::GetConfigString(Platform::FirmwarePath); + Log(LogLevel::Debug, "SPI firmware: loading from file %s\n", FirmwarePath.c_str()); + bool makecopy = false; std::string origpath = FirmwarePath; FirmwarePath += Platform::InstanceFileSuffix(); |