pmaports/main/postmarketos-mkinitfs-hook-apx/00-apx.sh
Anton Bambura dd5f448bee
main/postmarketos-mkinitfs-hook-apx: new aport (MR 4231)
Nvidia Tegra devices have APX mode which allows to flash/debrick
a device even with broken bootloader. It also allows to sideload
bootloader which is useful when porting a new bootloader.

Some devices have a key combination to enter this mode, some devices
don't have one. This hook alters two Tegra PMC registers which
causes device to enter APX mode. It works on the most devices
including some of those that don't have a key combination for APX.

Usage:
pmbootstrap initfs hook_add apx
pmbootstrap flasher boot

[ci:skip-build]: already built successfully in CI
2023-07-07 09:00:01 +02:00

6 lines
102 B
Bash

#!/bin/sh
echo "PMOS: Entering APX" > /dev/kmsg
devmem2 0x7000E450 w 0x02
devmem2 0x7000E400 w 0x10