Difference between revisions of "SceSysStateMgr"

From Vita Development Wiki
Jump to navigation Jump to search
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[Boot Sequence]]
+
This module initializes part of the kernel, loads the scripted config and loads the rest of the modules needed for boot.
 +
 
 +
also see : [[Boot Sequence#SceSysStateMgr|Boot Sequence(SceSysStateMgr)]]
 +
 
 +
== boot configs ==
 +
 
 +
The lower the priority, the higher.
 +
 
 +
<code>.rpath</code> is Remote Path
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Priority
 +
! Path
 +
! Type
 +
|-
 +
| 0
 +
| host0:psp2config.skprx
 +
| Module
 +
|-
 +
| 1
 +
| sd0:psp2config.skprx
 +
| Module
 +
|-
 +
| 2
 +
| ux0:psp2config.skprx
 +
| Module
 +
|-
 +
| 3
 +
| os0:psp2config_dolce.skprx
 +
| Module
 +
|-
 +
| 3
 +
| os0:psp2config_vita.skprx
 +
| Module
 +
|-
 +
| ?
 +
| host0:psp2config.rpath
 +
| Plaintext
 +
|}
 +
 
 +
== command prefixs ==
 +
 
 +
=== # ===
 +
 
 +
to comment.
 +
 
 +
=== - ===
 +
 
 +
to ignore error.
 +
 
 +
=== & ===
 +
 
 +
unknown.
 +
 
 +
== module load path processing ==
 +
 
 +
Space cannot be included in path, and the written after the space is ignored by module load.
 +
 
 +
<source>
 +
load sd0:module.skprx this args param1
 +
# -> load sd0:module.skprx and pass "sd0:module.skprx this args param1" to argp.
 +
</source>
 +
 
 +
 
 +
== bootconfig commands ==
 +
 
 +
=== load ===
 +
 
 +
<source>
 +
load sd0:module.skprx
 +
</source>
 +
 
 +
=== unload ===
 +
 
 +
<source>
 +
unload sd0:module.skprx
 +
</source>
 +
 
 +
=== loadonly ===
 +
 
 +
<source>
 +
loadonly sd0:module.skprx
 +
</source>
 +
 
 +
=== start ===
 +
 
 +
<source>
 +
start sd0:module.skprx
 +
</source>
 +
 
 +
=== stop ===
 +
 
 +
<source>
 +
stop sd0:module.skprx
 +
</source>
 +
 
 +
=== unloadonly ===
 +
 
 +
<source>
 +
unloadonly sd0:module.skprx
 +
</source>
 +
 
 +
=== spawn ===
 +
 
 +
Create a new process.
 +
 
 +
<source>
 +
if SAFE_MODE
 +
spawn os0:ue/safemode.self
 +
end
 +
endif
 +
</source>
 +
 
 +
=== spawnwait ===
 +
 
 +
Create a new process and wait until it finishes.
 +
 
 +
<source>
 +
if MANUFACTURING_MODE
 +
- spawnwait sd0:psp2diag.self
 +
- spawnwait ux0:psp2diag.self
 +
endif
 +
</source>
 +
 
 +
=== wait ===
 +
 
 +
Probably wait for the process to finish.
 +
 
 +
=== kill ===
 +
 
 +
unknown
 +
 
 +
=== end ===
 +
 
 +
defines the end of config.
 +
 
 +
<source>
 +
if SAFE_MODE
 +
spawn os0:ue/safemode.self
 +
end
 +
endif
 +
</source>
 +
 
 +
=== sleep ===
 +
 
 +
unknown
 +
 
 +
=== echo ===
 +
 
 +
unknown
 +
 
 +
=== loadconfig ===
 +
 
 +
same to include
 +
 
 +
<source>
 +
- loadconfig sd0:boot_config_second.txt
 +
</source>
 +
 
 +
=== if ===
 +
 
 +
defines if statement.
 +
 
 +
<source>
 +
if USB_ENUM_WAKEUP
 +
load os0:kd/enum_wakeup.skprx
 +
endif
 +
</source>
 +
 
 +
MANUFACTURING_MODE
 +
 
 +
EXTERNAL_BOOT_MODE
 +
 
 +
UPDATE_MODE
 +
 
 +
USB_ENUM_WAKEUP
 +
 
 +
BSOD_REBOOT
 +
 
 +
UD0_EXIST
 +
 
 +
SAFE_MODE
 +
 
 +
DEVELOPMENT_MODE
 +
 
 +
AU_CODEC_IC_CONEXANT
 +
 
 +
=== ifmodel ===
 +
 
 +
maybe same to if
 +
 
 +
=== ifnmodel ===
 +
 
 +
<source>
 +
ifnmodel USB_ENUM_WAKEUP
 +
# if USB_ENUM_WAKEUP is 0, load module.skprx.
 +
load sd0:module.skprx
 +
endif
 +
</source>
 +
 
 +
=== else ===
 +
 
 +
Define when branching with if statement.
 +
 
 +
<source>
 +
if USB_ENUM_WAKEUP
 +
load os0:kd/enum_wakeup.skprx
 +
else
 +
load sd0:module.skprx
 +
endif
 +
</source>
 +
 
 +
=== endif ===
 +
 
 +
Define at the end of if statement.
 +
 
 +
<source>
 +
if USB_ENUM_WAKEUP
 +
load os0:kd/enum_wakeup.skprx
 +
endif
 +
</source>
 +
 
 +
=== include ===
 +
 
 +
include add config.
 +
 
 +
<source>
 +
- include sd0:boot_config_second.txt
 +
</source>
 +
 
 +
=== cd ===
 +
 
 +
Setting working dir
 +
 
 +
<source>
 +
cd sd0:kd/
 +
load module.skprx
 +
# -> load "sd0:kd/module.skprx"
 +
</source>
 +
 
 +
=== setenv ===
 +
 
 +
same to setmodfile.
 +
 
 +
Looks similar to setenv on Linux.
 +
 
 +
=== setmodfile ===
 +
 
 +
unknown
 +
 
 +
=== repeat ===
 +
 
 +
Probably not implemented in 3.60
 +
 
 +
=== endrepeat ===
 +
 
 +
Probably not implemented in 3.60
 +
 
 +
=== appspawn ===
 +
 
 +
<source>
 +
- appspawn vs0:vsh/shell/shell.self SHELL_BUDGET_ID
 +
 
 +
or
 +
 
 +
- appspawn sd0:game.self GAME_BUDGET_ID
 +
</source>
 +
 
 +
=== tload ===
 +
 
 +
Tool memory load.
 +
 
 +
LoadStart the module to the devkit dedicated memory. Requires DIPSW 210.
 +
 
 +
<source>tload sd0:module.skprx</source>
 +
 
 +
=== umount_bootfs ===
 +
 
 +
unmount bootfs
 +
 
 +
<source>
 +
umount_bootfs
 +
</source>
 +
 
 +
=== sload ===
 +
 
 +
Show mode load.
 +
 
 +
LoadStart in Show mode. Requires IsShowMode flag in Hardware Info.
 +
 
 +
<source>sload sd0:module.skprx</source>
 +
 
  
 
[[Category:Libraries]]
 
[[Category:Libraries]]
 
[[Category:Kernel]]
 
[[Category:Kernel]]

Latest revision as of 14:17, 1 February 2021

This module initializes part of the kernel, loads the scripted config and loads the rest of the modules needed for boot.

also see : Boot Sequence(SceSysStateMgr)

boot configs

The lower the priority, the higher.

.rpath is Remote Path

Priority Path Type
0 host0:psp2config.skprx Module
1 sd0:psp2config.skprx Module
2 ux0:psp2config.skprx Module
3 os0:psp2config_dolce.skprx Module
3 os0:psp2config_vita.skprx Module
? host0:psp2config.rpath Plaintext

command prefixs

#

to comment.

-

to ignore error.

&

unknown.

module load path processing

Space cannot be included in path, and the written after the space is ignored by module load.

load sd0:module.skprx this args param1
# -> load sd0:module.skprx and pass "sd0:module.skprx this args param1" to argp.


bootconfig commands

load

load sd0:module.skprx

unload

unload sd0:module.skprx

loadonly

loadonly sd0:module.skprx

start

start sd0:module.skprx

stop

stop sd0:module.skprx

unloadonly

unloadonly sd0:module.skprx

spawn

Create a new process.

if SAFE_MODE
spawn os0:ue/safemode.self
end
endif

spawnwait

Create a new process and wait until it finishes.

if MANUFACTURING_MODE
- spawnwait sd0:psp2diag.self
- spawnwait ux0:psp2diag.self
endif

wait

Probably wait for the process to finish.

kill

unknown

end

defines the end of config.

if SAFE_MODE
spawn os0:ue/safemode.self
end
endif

sleep

unknown

echo

unknown

loadconfig

same to include

- loadconfig sd0:boot_config_second.txt

if

defines if statement.

if USB_ENUM_WAKEUP
load os0:kd/enum_wakeup.skprx
endif

MANUFACTURING_MODE

EXTERNAL_BOOT_MODE

UPDATE_MODE

USB_ENUM_WAKEUP

BSOD_REBOOT

UD0_EXIST

SAFE_MODE

DEVELOPMENT_MODE

AU_CODEC_IC_CONEXANT

ifmodel

maybe same to if

ifnmodel

ifnmodel USB_ENUM_WAKEUP
# if USB_ENUM_WAKEUP is 0, load module.skprx.
load sd0:module.skprx
endif

else

Define when branching with if statement.

if USB_ENUM_WAKEUP
load os0:kd/enum_wakeup.skprx
else
load sd0:module.skprx
endif

endif

Define at the end of if statement.

if USB_ENUM_WAKEUP
load os0:kd/enum_wakeup.skprx
endif

include

include add config.

- include sd0:boot_config_second.txt

cd

Setting working dir

cd sd0:kd/
load module.skprx
# -> load "sd0:kd/module.skprx"

setenv

same to setmodfile.

Looks similar to setenv on Linux.

setmodfile

unknown

repeat

Probably not implemented in 3.60

endrepeat

Probably not implemented in 3.60

appspawn

- appspawn vs0:vsh/shell/shell.self SHELL_BUDGET_ID

or

- appspawn sd0:game.self GAME_BUDGET_ID

tload

Tool memory load.

LoadStart the module to the devkit dedicated memory. Requires DIPSW 210.

tload sd0:module.skprx

umount_bootfs

unmount bootfs

umount_bootfs

sload

Show mode load.

LoadStart in Show mode. Requires IsShowMode flag in Hardware Info.

sload sd0:module.skprx