Git Product home page Git Product logo

ps2toolchain-ee's Introduction

CI CI-Docker

ps2toolchain-ee

This program will automatically build and install a EE compiler, which is used in the creation of homebrew software for the Sony PlayStation® 2 videogame system.

ATTENTION

If you're trying to install in your machine the WHOLE PS2 Development Environment, this is NOT the repo to use! Instead, you should use instead the ps2dev repo.

What these scripts do

These scripts download (with git clone) and install binutils 2.36.0 (ee), gcc 11.1.0 (ee), newlib 4.1.0 (ee).

Requirements

  1. Install gcc/clang, make, patch, git, and texinfo if you don't have those packages.
  2. Ensure that you have enough permissions for managing PS2DEV location (which defaults to /usr/local/ps2dev). PS2DEV location MUST NOT have spaces or special characters in its path! For example, on Linux systems, you can set access for the current user by running commands:
export PS2DEV=/usr/local/ps2dev
sudo mkdir -p $PS2DEV
sudo chown -R $USER: $PS2DEV
  1. Add this to your login script (example: ~/.bash_profile)
export PS2DEV=/usr/local/ps2dev
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2DEV/ee/bin
  1. Run toolchain.sh ./toolchain.sh

ps2toolchain-ee's People

Contributors

akuhak avatar fjtrujy avatar madebr avatar rickgaiser avatar uyjulian avatar ziemas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ps2toolchain-ee's Issues

Enable Link Time Optimizations

I noticed that the install script disables LTO in gcc completely. Is there a specific reason for it?
LTO support could reduce binary sizes dramatically, especially in projects that make heavy use of modern c++ features.

libgcc compiling error since 11.0 switch

I tried to reconfigure the ps2dev environment on my dev machine today, and was met with a nice libcpp failure:

libtool: link: ranlib .libs/libbacktrace.a
libtool: link: ( cd ".libs" && rm -f "libbacktrace.la" && ln -s "../libbacktrace.la" "libbacktrace.la" )
../../../libcpp/expr.c: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’:
../../../libcpp/expr.c:812:18: error: format not a string literal and no format arguments [-Werror=format-security]
  812 |        0, message);
      |                  ^
../../../libcpp/expr.c:815:39: error: format not a string literal and no format arguments [-Werror=format-security]
  815 |           virtual_location, 0, message);
      |                                       ^
../../../libcpp/expr.c:825:34: error: format not a string literal and no format arguments [-Werror=format-security]
  825 |      virtual_location, 0, message);
      |                                  ^

You can reproduce this by installing Nix on any linux capable machine, put a file named default.nix included below in a folder and, in the same folder, run the command nix-shell. Inside the environment try to run build-all.sh from ps2dev and you should encounter the issue.

default.nix:

{ pkgs ? import <nixpkgs> {} }:
let fhs = pkgs.buildFHSUserEnv {
  name = "ps2dev";
  targetPkgs = pkgs: (with pkgs; [
    gnumake
    clang
    clang-tools
    gcc
    wget
    git
    patch
    texinfo
    bash
    file
    bison
    flex
    gettext
    gsl
    gnum4
    gmp.dev
    gmp.out
    mpfr.out
    mpfr.dev
    libmpc
  ]);
  runScript = "bash";
};
in pkgs.stdenv.mkDerivation {
  name = "ps2dev-shell";
  nativeBuildInputs = [ fhs ];
  shellHook = ''
    # or whatever you want
    export PS2DEV=$HOME/ps2
    mkdir -p $PS2DEV
    chown -R $USER: $PS2DEV

    # setup login env
    export PS2SDK=$PS2DEV/ps2sdk
    export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin
    exec ps2dev
    '';
}

ABI issues resulting in TLB misses

Here is a sample, it should draw a sprite to the screen, if not, that's not really the issue anyways.
Building this and running it will result in a TLB miss coming from the draw() function

https://gist.github.com/F0bes/e98dceac010ff4176868cfe69f054c11

This isn't the first time I've had ABI related issues. The partial solution in this case was to specify mabi=32, but that isn't ideal, and not possible for the software above.
image

Both issues have something in common, the HI 16 bits are what is wrong. In the first example, v0 is set incorrectly
Here is a precompiled ELF.
tc_test.zip
.

binutils compiling problem

I'm having a bit of trouble compiling binutils-gdb branch ee-v2.36.0 on Debian Buster. Using my phone through the UserLAnd app compiling with gcc version 8.3.0.

Errors as fallows:

*** This configuration is not supported in the following subdirectories:
     gdbserver gprof sim
    (Any other directories should still work fine.)
mkdir -p -- ./libiberty
mkdir -p -- ./zlib
mkdir -p -- ./intl
mkdir -p -- ./etc
Configuring in ./libiberty
Configuring in ./zlib
Configuring in ./intl
Configuring in ./etc
mkdir -p -- ./libdecnumber
Configuring in ./libdecnumber
cat: -: Operation not permitted
cat: -: Operation not permitted
cat: -: Operation not permitted
configure: WARNING: minix/config.h: present but cannot be compiled
configure: WARNING: minix/config.h:     check for missing prerequisite headers?
configure: WARNING: minix/config.h: see the Autoconf documentation
configure: WARNING: minix/config.h:     section "Present But Cannot Be Compiled"
configure: WARNING: minix/config.h: proceeding with the compiler's result
cat: -: Operation not permitted
configure: WARNING: decimal float is not supported for this target, ignored
mkdir -p -- ./readline
Configuring in ./readline
cat: -: Operation not permitted
mkdir -p -- ./gnulib
Configuring in ./gnulib

Beginning configuration for readline-8.0 for armv7l-unknown-linux-gnueabihf

cat: -: Operation not permitted
cat: -: Operation not permitted
ar: 'u' modifier ignored since 'D' is the default (see  'U')
mkdir -p -- ./binutils
Configuring in ./binutils
configure: WARNING: libdebuginfod is missing or unusable; some features may be unavailable.
mkdir -p -- ./gas
Configuring in ./gas
cat: -: Operation not permitted
mkdir -p -- ./ld
Configuring in ./ld
cat: -: Operation not permitted
config.status: error: could not setup config files machinery
make[1]: *** [Makefile:3602: configure-binutils] Error 1
make[1]: *** Waiting for unfinished jobs....
cat: -: Operation not permitted
cat: -: Operation not permitted
config.status: creating po/POTFILES
config.status: creating po/Makefile
make: *** [Makefile:853: all] Error 2
../scripts/001-binutils.sh: Failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.