Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DvaMishkiLapa/07f5180a6710d2a288f363400e79e41d to your computer and use it in GitHub Desktop.
Save DvaMishkiLapa/07f5180a6710d2a288f363400e79e41d to your computer and use it in GitHub Desktop.
PSVita Linux build instructions

0) Optional: Solder UART0 pins

  1. Check here for the pinout. You will also need a 1.8V level shifter.

1) Install an ARMv7 cross-compiler

  1. Go to https://toolchains.bootlin.com
  2. Select arch: armv7-eabihf
  3. Select libc: glibc
  4. Download bleeding-edge
  5. Uncompress it (for example to /opt)
  6. Add the bin/directory of the toolchain to $PATH
    • In my case: export PATH=$PATH:/opt/armv7-eabihf--glibc--bleeding-edge-2020.02-2/bin

2) Build Buildroot

  1. git clone git://git.buildroot.net/buildroot && cd buildroot
  2. Download and copy this Buildroot .config to .config
  3. If using a toolchain path different than /opt/armv7-eabihf--glibc--bleeding-edge-2020.02-2:
    • make menuconfig
    • Navigate to Toolchain --->
    • Properly set the Toolchain path, save and exit
  4. make -j
  5. This will generate output/images/rootfs.cpio.xz

3) Build Linux

  1. git clone https://github.com/xerpi/linux_vita.git
  2. cd linux_vita && cp ../buildroot/output/images/rootfs.cpio.xz ./
  3. make ARCH=arm vita_defconfig
  4. make ARCH=arm CROSS_COMPILE=arm-linux- -j
  5. make ARCH=arm CROSS_COMPILE=arm-linux- vita1000.dtb vita2000.dtb pstv.dtb
  6. This will generate arch/arm/boot/zImage and arch/arm/boot/dts/{vita1000.dtb,vita2000.dtb,pstv.dtb}

4) Install vitasdk/DolceSDK

5) Build vita-baremetal-loader

  1. git clone https://github.com/xerpi/vita-baremetal-loader.git
  2. cd vita-baremetal-loader && make
  3. This will generate baremetal-loader.skprx

6) Install libbaremetal

  1. git clone https://github.com/xerpi/vita-libbaremetal.git
  2. cd vita-libbaremetal/libbaremetal && make install

7) Build vita-baremetal-linux-loader

  1. git clone https://github.com/xerpi/vita-baremetal-linux-loader.git
  2. cd vita-baremetal-linux-loader && make
  3. This will generate vita-baremetal-linux-loader.bin

8) Build and install the Plugin Loader VPK

  1. git clone https://bitbucket.org/xerpi/vita_plugin_loader.git
  2. cd vita_plugin_loader && mkdir build && cd build && cmake .. && make
  3. Install plugin_loader.vpk

9) Boot Linux

  1. Copy baremetal-loader.skprx to ux0:data/tai/kplugin.skprx
    • Configurable in vita_plugin_loader/main.c:13
  2. Copy vita-baremetal-linux-loader.bin to ux0:/baremetal/payload.bin
    • Configurable in vita-baremetal-loader/config.h
  3. Copy linux_vita/arch/arm/boot/zImage to ux0:/linux/zImage (uma0 if using sd2vita)
  4. Copy linux_vita/arch/arm/boot/dts/{vita1000.dtb,vita2000.dtb,pstv.dtb} to ux0:/linux/ (uma0 if using sd2vita)
  5. Launch the Plugin Loader VPK

More information

Deprecated steps

4) Build vita-linux-loader (DEPRECATED: use vita-baremetal-linux-loader instead)

  1. Install vitasdk
  2. git clone git@github.com:xerpi/vita-linux-loader.git
  3. cd vita-linux-loader && make
  4. This will generate linuxloader.skprx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment