upgrade_app
is the built-in upgrade flasher on the PlayStation Classic. It
reads an upgrade file from USB, verifies it, and flashes it. In normal boot,
it needs to be called to start the upgrade process. In recovery boot, it is
automatically started and polls for files on an attached USB drive to flash
the normal system. The program takes a single argument as a command. They are:
normal
: Reboots the system to recovery and waits to flash a normal system. It will refuse to boot into recovery if it detects recovery is not successfully flashed previously. After flashing completes successfully, the system is rebooted back to normal.recovery
: Flashes the recovery system. A flag will be set before flashing to make sure the program won't reboot into a partially flashed recovery system.
Once upgrade_app
runs, it mounts /dev/sda1
to /dev/sdd1
and /dev/sda
to /dev/sdd
into the mountpoints /run/media/sda1
to /run/media/sdd1
and /run/media/sda
to /run/media/sdd
. After each mounted the program looks for
upgrade packages at the root of the drive. Drives are not unmounted if the search
fails.
This package contains files to be flashed to a normal system.
boot.img
: Normal kernel image, flashes toBOOTIMG1
partitionrootfs.ext4
: Normal system rootfs, flashes toROOTFS1
partitiontz.img
: Normal system Trusted Execution Environment image, flashes toTEE1
partitionuserdata.ext4
: User data filesystem, flashes toUSRDATA
partition
This file is the raw image written to the GAADATA
partition.
One or both of LBOOT.EPB
or LDATA.EPB
can be flashed at the same time.
This package contains files to be flashed to the recovery system.
boot.img
: Recovery kernel image, flashes toBOOTIMG2
partitionrecovery.ext4
: Recovery system rootfs, flashes toROOTFS2
partitiontz.img
: Recovery system Trusted Execution Environment image, flashes toTEE2
partition
LBOOT.EPB
and LRECOVERY.EPB
are both plain ZIP files, with all files included
stored at the root of the ZIP file. If a partition does not need to be flashed,
the file can be omitted. Files are flashed in the order listed, and if one file
fails to flash, the remaining files will not be flashed.
When files are being flashed, only as much data as provided will be written. The partitions are not erased, so it is possible to flash 0-byte files.
- Flashing green: the program is looking for upgrade packages, or currently flashing the system.
- Solid green: the program has successfully completed flashing.
- Flashing red: the program encountered an error.
- -1: an error has occurred
- 0: flashing was successful
- 1: command unknown
- -2: no USB drives found
- -3: drives mounted but file not found
- -255: mounting error