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
ExtremsAlt (talk | contribs)
Undo revision 100485 by BrianJones (talk)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{stub}}
{{stub}}
Something with boot2?
'''/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"
ioctlv 4,12,14 last only in IOS56+
! Number
 
! In
 
! Out
== /dev/boot2 IOS_Ioctlv ==
! Description
{| 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
| 1 or 2
| style="vertical-align: top;" rowspan="3"  |?
| -
| style="vertical-align: top;" rowspan="3"  |1
| -
| style="vertical-align: top;" rowspan="3"  |2
| Writes the new blockmap for the newly written boot2
| style="vertical-align: top;" |?
| style="vertical-align: top;" |0x40
| style="vertical-align: top;" rowspan="3"  |No
| style="vertical-align: top;" rowspan="3"  |?
|-
|?
|0x4
|-
|?
|0x4
|-
| 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
|-  
|?
|0x4
|-  
|? (only if you use 2 In/Out)(if this is 0 it is the same as use only 1 in and Out)
|0x4
|-
|? (only if you use 2 In/Out)
|Different each time(0xD* 2.in)
|-
| style="vertical-align: top;" |0xE
| style="vertical-align: top;" |?
| style="vertical-align: top;" |minimal 1
| style="vertical-align: top;" |0
| style="vertical-align: top;" |?
| style="vertical-align: top;" |?
| style="vertical-align: top;" |No
| style="vertical-align: top;" |?
|-
|-
| 3
| 4 bytes: boot2 size
| -
| Copies the main boot2 over to the backup copy.
|}
|}


== /dev/boot2 error codes ==
== /dev/boot2 error codes ==
See also: [[:/dev/flash]]


{| class="wikitable"
{| class="wikitable"
|-
|-
! Error code
! Error code
! POSIX equivalent
! Notes
! Notes
|-
|-
| -101
| -4
|  ?
| Invalid argument
| Invalid Wrong IN or OUT size, wrong size for a part of the vector, vector alignment problems, non-existant ioctl,wrong structure
|-
|-
|-
|-
| -102
| -5
| ?
| Open: Handle is already open
|  ?
Ioctl 3: Boot2 is too large, seemingly
|-|-
| -104
|  ?
|  ?
|-|-
| -106
|  ?
|  ?
|-|-
| -107
|  ?
|  ?
|-|-
| -108
|  ?
|  ?
|-
|-
|-
|-
|}
|}
[[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