Closed nickb834 closed 2 years ago
Powering off is indeed supported, try poweroff -f
. It may be the swiftest shutdown you’ve ever seen for a Linux machine. :-) Likewise halt -f
, but reboot -f
isn’t serviceable as of yet. Confer commit 92375ad22b6ee40e08723d7ff9e7f7cd7796bd88 for details.
If memory serves me the -f
option skips a failed attempt by Busybox to run a shutdown script via init, that I suppose isn’t installed with your INITRAMFS. Such scripts normally unmount filesystems, etc. We ought to write a note about this on the Busybox wiki page.
IIRC poweroff scmd won't work if dev9 is turned on.
Also, on older SCPH-1xxxx hardware, poweroff scmd won't work at all since the mechacon on those consoles does not support that command.
@uyjulian, yes, disclaimers apply. :-) The SCPH-1xxxx models are currently listed as incompatible, mainly due to issue #28, and we’ve got (for scmd_read_machine_name
)
and we’ll eventually need to do something similar to
for scmd_power_off
too...
IIRC poweroff scmd won't work if dev9 is turned on.
Hmm, it works in combination with the expansion bay ATA driver, which surely needs dev9 powered on, doesn’t it? See comment https://github.com/frno7/linux/issues/18#issuecomment-877668862 et al.
Hmm, it works in combination with the expansion bay ATA driver, which surely needs dev9 powered on, doesn’t it? See comment #18 (comment) et al.
On the expansion bay connector there is the PWR_CTRL
/ POW_CTRL
signal tied to the syscon and this appears to be tied to the value of the register 0xBF80146C
. In this case I'll refer to this as dev9 power.
This, among other things, controls the power off behavior (e.g. what happens when you press the power button or the power off scmd is sent). IIRC sending the power off scmd with dev9 powered on will result in nothing happening, so it needs to be powered off e.g. https://github.com/ps2dev/ps2sdk/blob/f4e8415ebd4146f414670150a92f472dca9ddba3/iop/dev9/dev9/src/ps2dev9.c#L359 before sending the power off scmd.
Yes, we have the corresponding power operations in the Linux kernel here:
It’s supposed to be powered off by iop_dev9_exit
but I’m not completely sure that’s needed for powering off the system via SCMD.
A lot of the dev9 is presently unclear, including the names and purposes of most registers, unfortunately. Is there a good, reliable and reasonably complete write up of it somewhere? I’ve seen DEV9C.txt
2017-02-11 by Wisi.
DEV9C.txt
and SPEED.txt
in IOP_DMAC_DEV9_SPEED_docs_2017.02.11.zip
are pretty much the documents out there.
DEV9C.txt
is related to the Dev9 controller on the PS2 side, which would be physically located near the expansion bay connector.
SPEED.txt
is related to the SPEED chip physically located in the network adapter attached to the expansion bay connector.
It also helps if you also refer to the service manual for the SCPH-39000 as the aforementioned documents refer to signals as written in the schematics in the service manual.
I've noticed that reboot / shutdown / halt doesn't work - I'm guessing this is something to do with the busybox source needs a patch to deal with the hardware on a PS2 - I've had a quick look through this repo but I can't tell if halt / reboot etc are actually expected to be supported.
Is there a workaround? or is it the case that it's unsupported or is this an issue with my build?