In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

/dev/boot2: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
Ichfly (talk | contribs)
ups
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Something with boot2?
{{stub}}
'''/dev/boot2''' can be written to to install a new [[boot2]].{{check}} '''THIS HAS NOT BEEN VERIFIED, DO NOT RELY ON THIS TO INSTALL A CUSTOM BOOT2.'''


Accept open,close,read,write,seek,ioctl,ioctlv
This accepts the following commands: open, close, write, ioctl


14 ioctl(0,4,12 return -101)
== /dev/boot2 IOS_Ioctl ==
{| class="wikitable"
! Number
! In
! Out
! Description
|-
| 1 or 2
| -
| -
| Writes the new blockmap for the newly written boot2
|-
| 3
| 4 bytes: boot2 size
| -
| Copies the main boot2 over to the backup copy.
|}


ioctlv 4,12,14 last only in IOS56+
== /dev/boot2 error codes ==


See also: [[:/dev/flash]]


== /dev/boot2 IOS_Ioctlv ==
{| class="wikitable"
{| class="wikitable" style="margin: 1em auto 1em auto"
! style="vertical-align: top;" |number
! style="vertical-align: top;" |name
! style="vertical-align: top;" |in count
! style="vertical-align: top;" |out count
! style="vertical-align: top;" |vec entry target
! style="vertical-align: top;" |vec entry size [bytes]
! style="vertical-align: top;" |libogc prototype
! style="vertical-align: top;" |Description
|-
|-
| style="vertical-align: top;" rowspan="3" |0xC
! Error code
| style="vertical-align: top;" rowspan="3"  |?
! Notes
| style="vertical-align: top;" rowspan="3"  |1
| style="vertical-align: top;" rowspan="3"  |2
| style="vertical-align: top;" |?
| style="vertical-align: top;" |0x40
| style="vertical-align: top;" rowspan="3"  |No
| style="vertical-align: top;" rowspan="3"  |?
|-
|?
|0x4
|-
|-
|?
| -4
|0x4
| Invalid argument
|-
|-
| style="vertical-align: top;" "rowspan="3" |0x4
| style="vertical-align: top;" "rowspan="3" |?
| style="vertical-align: top;" |1/2
| style="vertical-align: top;" |1/2
| style="vertical-align: top;" "rowspan="3" |?
| style="vertical-align: top;" "rowspan="3" |0x40
| style="vertical-align: top;" "rowspan="3" |No
| style="vertical-align: top;" "rowspan="3" |Can be used with 1 In and 1 Out or 2 In and 2 Out
|-
|?
|0x4
|-
|?
|0x4
|-
|?
|Different each time
|-
|-
| style="vertical-align: top;" |0xE
| -5
| style="vertical-align: top;" |?
| Open: Handle is already open
| style="vertical-align: top;" |minimal 1
Ioctl 3: Boot2 is too large, seemingly
| style="vertical-align: top;" |0
|-
| style="vertical-align: top;" |?
| style="vertical-align: top;" |?
| style="vertical-align: top;" |No
| style="vertical-align: top;" |?
|-
|-
|}
|}
[[Category:Wii Filesystem]]

Latest revision as of 05:06, 25 May 2025

/dev/boot2 can be written to to install a new boot2.[check] THIS HAS NOT BEEN VERIFIED, DO NOT RELY ON THIS TO INSTALL A CUSTOM BOOT2.

This accepts the following commands: open, close, write, ioctl

/dev/boot2 IOS_Ioctl

Number In Out Description
1 or 2 - - Writes the new blockmap for the newly written boot2
3 4 bytes: boot2 size - Copies the main boot2 over to the backup copy.

/dev/boot2 error codes

See also: /dev/flash

Error code Notes
-4 Invalid argument
-5 Open: Handle is already open

Ioctl 3: Boot2 is too large, seemingly