Difference between revisions of "Boot2"

From WiiBrew
Jump to navigation Jump to search
(Removed incorrect info)
 
(12 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
{{Stub}}
 
{{Stub}}
  
'''boot2''' is the [[Wii]]'s third-stage bootloader. It is responsible for loading the [[System Menu]] TMD and loading the appropriate [[IOS]].
+
'''boot2''' is the [[Wii]]'s third-stage bootloader. It is responsible for loading the [[System Menu]] [[TMD]] and loading the appropriate [[IOS]] under normal circumstances, although it can also load [[MIOS]] if it detects the lowered clock speed set by [[BC]] (if [[IOS/Syscalls|syscall 55]] returns 162).
 +
 
 +
boot2 is also launched by MIOS when the power button is pressed; the System Menu is initialized in this case, and [[Memory Map|0x80003164]] <!-- read as c0003164 by the system menu; written as 00003164 by boot2 --> is set to 1 if the SRSTB_CPU bit is set in [[Hardware/Hollywood_Registers#HW_RESETS|HW_RESETS]]; the System Menu checks 0x80003164 and shuts down if it is enabled and [[:/title/00000001/00000002/data/state.dat|state.dat]] is set appropriately, with the message "Shutdown system from GC!".
 +
 
 +
boot2 is built from the same code as a regular IOSes, but has a [[IOS/Syscalls|kernel flavor]] (syscall 47) of 0 instead of 3; boot2's ES module includes all of the [[:/dev/es|normal ES functionality]] but it goes unused due to this kernel flavor value.  Regular IOSes also have the same check for a flavor less than 3, but the bootmii path goes unused.
 +
 
 +
There are two copies of boot2 housed in [[Hardware/NAND|NAND]] blocks 1-7 in case of failure, loaded by [[boot1]].
 +
 
 +
boot2 was updated in the [[4.2]] update to [[boot2v4]], the only time Nintendo has ever pushed a boot2 update. This was done by calling ES_ImportBoot to install it into the boot2 region of the NAND. Unfortunately, Nintendo did not test ES_ImportBoot very well, which led to many Wiis receiving a [[Brick#Low Level Brick (LLB)|low-level brick]], even if they were previously unmodded.
  
 
== Version history ==
 
== Version history ==
Line 17: Line 25:
 
|-
 
|-
 
| v3
 
| v3
|  
+
| Only found in Wiis released before LU64+ that were not updated to 4.2. Fixes the [[signing bug]] in the unused signature check code, and supports the next [[Hollywood]] revision.
 
|-
 
|-
 
| [[boot2v4|v4]]
 
| [[boot2v4|v4]]
| Packaged in the [[System Menu 4.2|4.2 update]] to erase [[BootMii]] as boot2.  
+
| Packaged in the [[System Menu 4.2|4.2 update]] to erase [[BootMii]] as boot2. Also found preinstalled in LU64+ Wiis. Contains a different layout to break the [[HackMii Installer]].
 
|-
 
|-
 
| [[boot2v5|v5]]
 
| [[boot2v5|v5]]
| Only found on arabian Wiis, certain RVL-101 Wiis and the Wii Mini.  
+
| Only found on Arabian Wiis, the [[Wii Mini]] and newer [[RVL-101]] units.  
 
|}
 
|}
  
 
[[Category:Official software]]
 
[[Category:Official software]]

Latest revision as of 22:48, 22 May 2021

boot2 is the Wii's third-stage bootloader. It is responsible for loading the System Menu TMD and loading the appropriate IOS under normal circumstances, although it can also load MIOS if it detects the lowered clock speed set by BC (if syscall 55 returns 162).

boot2 is also launched by MIOS when the power button is pressed; the System Menu is initialized in this case, and 0x80003164 is set to 1 if the SRSTB_CPU bit is set in HW_RESETS; the System Menu checks 0x80003164 and shuts down if it is enabled and state.dat is set appropriately, with the message "Shutdown system from GC!".

boot2 is built from the same code as a regular IOSes, but has a kernel flavor (syscall 47) of 0 instead of 3; boot2's ES module includes all of the normal ES functionality but it goes unused due to this kernel flavor value. Regular IOSes also have the same check for a flavor less than 3, but the bootmii path goes unused.

There are two copies of boot2 housed in NAND blocks 1-7 in case of failure, loaded by boot1.

boot2 was updated in the 4.2 update to boot2v4, the only time Nintendo has ever pushed a boot2 update. This was done by calling ES_ImportBoot to install it into the boot2 region of the NAND. Unfortunately, Nintendo did not test ES_ImportBoot very well, which led to many Wiis receiving a low-level brick, even if they were previously unmodded.

Version history

Version Description
v1 Present on Prelaunch consoles.
v2 Present on launch-day Wii's.
v3 Only found in Wiis released before LU64+ that were not updated to 4.2. Fixes the signing bug in the unused signature check code, and supports the next Hollywood revision.
v4 Packaged in the 4.2 update to erase BootMii as boot2. Also found preinstalled in LU64+ Wiis. Contains a different layout to break the HackMii Installer.
v5 Only found on Arabian Wiis, the Wii Mini and newer RVL-101 units.