You cannot install arbitrary operating systems (Linux, Windows, Android) on PS2 or PSP. Their hardware is designed exclusively for Sony's proprietary firmware. Here's why—and what you can do.
The PSP has a thriving homebrew scene enabled by Custom Firmware (CFW):
PSP modding is well-documented and relatively safe. PS2 modding improves game access but doesn't enable general-purpose computing.